diff options
author | Max Kellermann <max@duempel.org> | 2009-04-28 09:31:44 +0200 |
---|---|---|
committer | Max Kellermann <max@duempel.org> | 2009-04-28 09:31:44 +0200 |
commit | b1c177528fdc601496dac735ff9839ed6438e992 (patch) | |
tree | 15b25bce4647fb6ca24315739b39846494f4d4ca | |
parent | 0edfbc8a5f74256a4b9eded2d6006d5e504757d4 (diff) | |
download | mpd-b1c177528fdc601496dac735ff9839ed6438e992.tar.gz mpd-b1c177528fdc601496dac735ff9839ed6438e992.tar.xz mpd-b1c177528fdc601496dac735ff9839ed6438e992.zip |
locate: use g_ascii_strcasecmp() instead of strcasecmp()
strcasecmp() is locale dependent, making it a bad choice for internal
string comparisons.
Diffstat (limited to '')
-rw-r--r-- | src/locate.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/locate.c b/src/locate.c index f0b0a2606..175bca35a 100644 --- a/src/locate.c +++ b/src/locate.c @@ -35,15 +35,15 @@ locate_parse_type(const char *str) { int i; - if (0 == strcasecmp(str, LOCATE_TAG_FILE_KEY) || - 0 == strcasecmp(str, LOCATE_TAG_FILE_KEY_OLD)) + if (0 == g_ascii_strcasecmp(str, LOCATE_TAG_FILE_KEY) || + 0 == g_ascii_strcasecmp(str, LOCATE_TAG_FILE_KEY_OLD)) return LOCATE_TAG_FILE_TYPE; - if (0 == strcasecmp(str, LOCATE_TAG_ANY_KEY)) + 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 == strcasecmp(str, tag_item_names[i])) + if (0 == g_ascii_strcasecmp(str, tag_item_names[i])) return i; return -1; |