diff options
author | Dan Winship <danw@gnome.org> | 2014-03-20 10:32:48 -0400 |
---|---|---|
committer | Dan Winship <danw@gnome.org> | 2014-04-09 10:50:55 -0400 |
commit | b1049940781556a3b8ca7230ae4c363dda09130e (patch) | |
tree | a1026762b6706c5e7a1e0dadf69a6045dc316e64 | |
parent | 042fb88fea1ad4e5de18f1ac1be4b4286feff7aa (diff) | |
download | NetworkManager-b1049940781556a3b8ca7230ae4c363dda09130e.tar.gz |
ifcfg-rh: use g_ascii_strcasecmp() in svTrueValue()
strcasecmp() is locale-dependent, which is not what we want
-rw-r--r-- | src/settings/plugins/ifcfg-rh/shvar.c | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/src/settings/plugins/ifcfg-rh/shvar.c b/src/settings/plugins/ifcfg-rh/shvar.c index b57a8fbfa2..c6c6808e45 100644 --- a/src/settings/plugins/ifcfg-rh/shvar.c +++ b/src/settings/plugins/ifcfg-rh/shvar.c @@ -256,15 +256,15 @@ svTrueValue(shvarFile *s, const char *key, int def) tmp = svGetValue(s, key, FALSE); if (!tmp) return returnValue; - if ( (!strcasecmp("yes", tmp)) || - (!strcasecmp("true", tmp)) || - (!strcasecmp("t", tmp)) || - (!strcasecmp("y", tmp)) ) returnValue = 1; + if ( (!g_ascii_strcasecmp("yes", tmp)) || + (!g_ascii_strcasecmp("true", tmp)) || + (!g_ascii_strcasecmp("t", tmp)) || + (!g_ascii_strcasecmp("y", tmp)) ) returnValue = 1; else - if ( (!strcasecmp("no", tmp)) || - (!strcasecmp("false", tmp)) || - (!strcasecmp("f", tmp)) || - (!strcasecmp("n", tmp)) ) returnValue = 0; + if ( (!g_ascii_strcasecmp("no", tmp)) || + (!g_ascii_strcasecmp("false", tmp)) || + (!g_ascii_strcasecmp("f", tmp)) || + (!g_ascii_strcasecmp("n", tmp)) ) returnValue = 0; g_free (tmp); return returnValue; |