zeroconf: eliminated strlen() usage from initZeroconf()
To test if a string is empty, we can just see if the first byte is 0. No need to include string.h for strlen() here.
This commit is contained in:
parent
49fa9708d5
commit
13867a1e7c
|
@ -22,8 +22,6 @@
|
|||
|
||||
#include <glib.h>
|
||||
|
||||
#include <string.h>
|
||||
|
||||
/* The default service name to publish
|
||||
* (overridden by 'zeroconf_name' config parameter)
|
||||
*/
|
||||
|
@ -47,7 +45,7 @@ void initZeroconf(void)
|
|||
|
||||
param = getConfigParam(CONF_ZEROCONF_NAME);
|
||||
|
||||
if (param && strlen(param->value) > 0)
|
||||
if (param && *param->value != 0)
|
||||
serviceName = param->value;
|
||||
|
||||
#ifdef HAVE_AVAHI
|
||||
|
|
Loading…
Reference in New Issue