aboutsummaryrefslogtreecommitdiffstats
path: root/src/zeroconf.c
diff options
context:
space:
mode:
authorMax Kellermann <max@duempel.org>2008-12-30 16:45:43 +0100
committerMax Kellermann <max@duempel.org>2008-12-30 16:45:43 +0100
commit13867a1e7c0769f5a5221c641ad96fd09e025207 (patch)
tree46ed3997b2e682489c19f373c0af3fdfe469465f /src/zeroconf.c
parent49fa9708d51b907f0a372a1fc68a1e27c9edae5e (diff)
downloadmpd-13867a1e7c0769f5a5221c641ad96fd09e025207.tar.gz
mpd-13867a1e7c0769f5a5221c641ad96fd09e025207.tar.xz
mpd-13867a1e7c0769f5a5221c641ad96fd09e025207.zip
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.
Diffstat (limited to '')
-rw-r--r--src/zeroconf.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/src/zeroconf.c b/src/zeroconf.c
index e51e5f045..f84eb9602 100644
--- a/src/zeroconf.c
+++ b/src/zeroconf.c
@@ -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