aboutsummaryrefslogtreecommitdiffstats
path: root/src/tag.c
diff options
context:
space:
mode:
authorMax Kellermann <max@duempel.org>2009-01-25 16:00:51 +0100
committerMax Kellermann <max@duempel.org>2009-01-25 16:00:51 +0100
commit80799fa84eb4330083e4de20b87f97beea7d6ba7 (patch)
treec2a329d7fc7b08213ea83bdbaa169e95a78b6cd3 /src/tag.c
parentbdfb6c239af53d72f0808fc34e15d671036e8832 (diff)
downloadmpd-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/tag.c')
-rw-r--r--src/tag.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/tag.c b/src/tag.c
index 242ea7383..fa8a4e517 100644
--- a/src/tag.c
+++ b/src/tag.c
@@ -71,6 +71,7 @@ static size_t items_size(const struct tag *tag)
void tag_lib_init(void)
{
+ const char *value;
int quit = 0;
char *temp;
char *s;
@@ -83,17 +84,16 @@ void tag_lib_init(void)
memset(ignoreTagItems, 0, TAG_NUM_OF_ITEM_TYPES);
ignoreTagItems[TAG_ITEM_COMMENT] = 1; /* ignore comments by default */
- param = config_get_param(CONF_METADATA_TO_USE);
-
- if (!param)
+ value = config_get_string(CONF_METADATA_TO_USE, NULL);
+ if (value == NULL)
return;
memset(ignoreTagItems, 1, TAG_NUM_OF_ITEM_TYPES);
- if (0 == strcasecmp(param->value, "none"))
+ if (0 == strcasecmp(value, "none"))
return;
- temp = c = s = g_strdup(param->value);
+ temp = c = s = g_strdup(value);
while (!quit) {
if (*s == ',' || *s == '\0') {
if (*s == '\0')