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:
Max Kellermann 2008-12-30 16:45:43 +01:00
parent 49fa9708d5
commit 13867a1e7c
1 changed files with 1 additions and 3 deletions

View File

@ -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