conf: use g_ascii_strcasecmp() instead of strcasecmp()

strcasecmp() is locale dependent, making it a bad choice for internal
string comparisons.
This commit is contained in:
Max Kellermann 2009-04-28 09:32:09 +02:00
parent b1c177528f
commit b2924405ae

View File

@ -59,11 +59,11 @@ static int get_bool(const char *value)
static const char *f[] = { "no", "false", "0", NULL };
for (x = t; *x; x++) {
if (!strcasecmp(*x, value))
if (!g_ascii_strcasecmp(*x, value))
return 1;
}
for (x = f; *x; x++) {
if (!strcasecmp(*x, value))
if (!g_ascii_strcasecmp(*x, value))
return 0;
}
return CONF_BOOL_INVALID;