From 13867a1e7c0769f5a5221c641ad96fd09e025207 Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Tue, 30 Dec 2008 16:45:43 +0100 Subject: 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. --- src/zeroconf.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'src/zeroconf.c') 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 -#include - /* 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 -- cgit v1.2.3