From 283c2621f3e7dabf2e1159807289743a0abe657d Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Wed, 14 Jan 2009 23:23:05 +0100 Subject: oggvorbis: use g_ascii_strncasecmp() instead of strncasecmp() Don't depend on the daemon's locale settings. Comment names are ASCII. --- src/decoder/oggvorbis_plugin.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/decoder/oggvorbis_plugin.c') diff --git a/src/decoder/oggvorbis_plugin.c b/src/decoder/oggvorbis_plugin.c index a74722cdf..e7df60326 100644 --- a/src/decoder/oggvorbis_plugin.c +++ b/src/decoder/oggvorbis_plugin.c @@ -90,11 +90,11 @@ static long ogg_tell_cb(void *vdata) static const char * vorbis_comment_value(const char *comment, const char *needle) { - int len = strlen(needle); + size_t len = strlen(needle); - if (strncasecmp(comment, needle, len) == 0 && *(comment + len) == '=') { + if (g_ascii_strncasecmp(comment, needle, len) == 0 && + comment[len] == '=') return comment + len + 1; - } return NULL; } -- cgit v1.2.3