diff options
author | Max Kellermann <max@duempel.org> | 2010-06-30 21:31:45 +0200 |
---|---|---|
committer | Max Kellermann <max@duempel.org> | 2010-06-30 21:31:45 +0200 |
commit | 9550c87327cdb0c97ca855bc5d77d28cbbb723d5 (patch) | |
tree | 6f68e282b3f67a3ef29e493af570afde77f16680 /src/locate.c | |
parent | e223e8a5b58509287098cb1deffb9655c7249a0c (diff) | |
download | mpd-9550c87327cdb0c97ca855bc5d77d28cbbb723d5.tar.gz mpd-9550c87327cdb0c97ca855bc5d77d28cbbb723d5.tar.xz mpd-9550c87327cdb0c97ca855bc5d77d28cbbb723d5.zip |
tag: added function tag_name_parse()
Convert a string into a tag_type enum.
Diffstat (limited to '')
-rw-r--r-- | src/locate.c | 6 |
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; } |