aboutsummaryrefslogtreecommitdiffstats
path: root/src/locate.c
diff options
context:
space:
mode:
authorMax Kellermann <max@duempel.org>2009-11-04 18:47:42 +0100
committerMax Kellermann <max@duempel.org>2009-11-04 18:47:42 +0100
commita434c35eb46ff71e2b0441595dcc7985e1b292c2 (patch)
tree073d3e51ab3a11090afecda68d6530415908ef79 /src/locate.c
parent7af8c88e37610fe7ebb167fadc28656385705d18 (diff)
downloadmpd-a434c35eb46ff71e2b0441595dcc7985e1b292c2.tar.gz
mpd-a434c35eb46ff71e2b0441595dcc7985e1b292c2.tar.xz
mpd-a434c35eb46ff71e2b0441595dcc7985e1b292c2.zip
tag: added function tag_name_parse()
Convert a string into a tag_type enum.
Diffstat (limited to 'src/locate.c')
-rw-r--r--src/locate.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/locate.c b/src/locate.c
index 175bca35a..7b4721fa9 100644
--- a/src/locate.c
+++ b/src/locate.c
@@ -42,9 +42,9 @@ locate_parse_type(const char *str)
if (0 == g_ascii_strcasecmp(str, LOCATE_TAG_ANY_KEY))
return LOCATE_TAG_ANY_TYPE;
- for (i = 0; i < TAG_NUM_OF_ITEM_TYPES; i++)
- if (0 == g_ascii_strcasecmp(str, tag_item_names[i]))
- return i;
+ i = tag_name_parse_i(str);
+ if (i != TAG_NUM_OF_ITEM_TYPES)
+ return i;
return -1;
}