diff options
author | Max Kellermann <max@duempel.org> | 2009-01-25 16:00:51 +0100 |
---|---|---|
committer | Max Kellermann <max@duempel.org> | 2009-01-25 16:00:51 +0100 |
commit | 80799fa84eb4330083e4de20b87f97beea7d6ba7 (patch) | |
tree | c2a329d7fc7b08213ea83bdbaa169e95a78b6cd3 /src/zeroconf.c | |
parent | bdfb6c239af53d72f0808fc34e15d671036e8832 (diff) | |
download | mpd-80799fa84eb4330083e4de20b87f97beea7d6ba7.tar.gz mpd-80799fa84eb4330083e4de20b87f97beea7d6ba7.tar.xz mpd-80799fa84eb4330083e4de20b87f97beea7d6ba7.zip |
use config_get_string() instead of config_get_param()
config_get_string() is easier to use than config_get_param() because
it unpacks the config_param struct.
Diffstat (limited to 'src/zeroconf.c')
-rw-r--r-- | src/zeroconf.c | 6 |
1 files changed, 1 insertions, 5 deletions
diff --git a/src/zeroconf.c b/src/zeroconf.c index dad9a8b7a..54bab6551 100644 --- a/src/zeroconf.c +++ b/src/zeroconf.c @@ -35,17 +35,13 @@ static int zeroconfEnabled; void initZeroconf(void) { const char *serviceName = SERVICE_NAME; - struct config_param *param; zeroconfEnabled = config_get_bool(CONF_ZEROCONF_ENABLED, DEFAULT_ZEROCONF_ENABLED); if (!zeroconfEnabled) return; - param = config_get_param(CONF_ZEROCONF_NAME); - - if (param && *param->value != 0) - serviceName = param->value; + serviceName = config_get_string(CONF_ZEROCONF_NAME, NULL); #ifdef HAVE_AVAHI init_avahi(serviceName); |