utils: 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:
parent
d3c93c1c77
commit
b546cf65bc
@ -135,7 +135,7 @@ int set_nonblocking(int fd)
|
|||||||
int stringFoundInStringArray(const char *const*array, const char *suffix)
|
int stringFoundInStringArray(const char *const*array, const char *suffix)
|
||||||
{
|
{
|
||||||
while (array && *array) {
|
while (array && *array) {
|
||||||
if (strcasecmp(*array, suffix) == 0)
|
if (g_ascii_strcasecmp(*array, suffix) == 0)
|
||||||
return 1;
|
return 1;
|
||||||
array++;
|
array++;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user