oggvorbis: use g_ascii_strncasecmp() instead of strncasecmp()

Don't depend on the daemon's locale settings.  Comment names are
ASCII.
This commit is contained in:
Max Kellermann 2009-01-14 23:23:05 +01:00
parent f353bf77ba
commit 283c2621f3

View File

@ -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;
}