Commit b2924405 authored by Max Kellermann's avatar Max Kellermann

conf: use g_ascii_strcasecmp() instead of strcasecmp()

strcasecmp() is locale dependent, making it a bad choice for internal string comparisons.
parent b1c17752
...@@ -59,11 +59,11 @@ static int get_bool(const char *value) ...@@ -59,11 +59,11 @@ static int get_bool(const char *value)
static const char *f[] = { "no", "false", "0", NULL }; static const char *f[] = { "no", "false", "0", NULL };
for (x = t; *x; x++) { for (x = t; *x; x++) {
if (!strcasecmp(*x, value)) if (!g_ascii_strcasecmp(*x, value))
return 1; return 1;
} }
for (x = f; *x; x++) { for (x = f; *x; x++) {
if (!strcasecmp(*x, value)) if (!g_ascii_strcasecmp(*x, value))
return 0; return 0;
} }
return CONF_BOOL_INVALID; return CONF_BOOL_INVALID;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment