Commit 13867a1e authored by Max Kellermann's avatar Max Kellermann

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.
parent 49fa9708
...@@ -22,8 +22,6 @@ ...@@ -22,8 +22,6 @@
#include <glib.h> #include <glib.h>
#include <string.h>
/* The default service name to publish /* The default service name to publish
* (overridden by 'zeroconf_name' config parameter) * (overridden by 'zeroconf_name' config parameter)
*/ */
...@@ -47,7 +45,7 @@ void initZeroconf(void) ...@@ -47,7 +45,7 @@ void initZeroconf(void)
param = getConfigParam(CONF_ZEROCONF_NAME); param = getConfigParam(CONF_ZEROCONF_NAME);
if (param && strlen(param->value) > 0) if (param && *param->value != 0)
serviceName = param->value; serviceName = param->value;
#ifdef HAVE_AVAHI #ifdef HAVE_AVAHI
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment