diff options
author | Dan Winship <danw@gnome.org> | 2012-09-25 10:44:23 -0400 |
---|---|---|
committer | Dan Winship <danw@gnome.org> | 2012-09-26 12:14:37 -0400 |
commit | 6878d20ac430207b49f46c6fafe705747c02e199 (patch) | |
tree | 7e440fe71bdbff85fbd2961ddc2986fd17eba9cd /libnm-glib | |
parent | 74b6b9c768338ce3cd58d781fd837e6abbf3e209 (diff) | |
download | NetworkManager-6878d20ac430207b49f46c6fafe705747c02e199.tar.gz |
all: Don't use ctype.h macros
The ctype macros (eg, isalnum(), tolower()) are locale-dependent. Use
glib's ASCII-only versions instead.
Also, replace isascii() with g_ascii_isprint(), since isascii()
accepts control characters, which isn't what the code wanted in any of
the places where it was using it.
Diffstat (limited to 'libnm-glib')
-rw-r--r-- | libnm-glib/nm-secret-agent.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/libnm-glib/nm-secret-agent.c b/libnm-glib/nm-secret-agent.c index ae048d803e..a43fa2cbf9 100644 --- a/libnm-glib/nm-secret-agent.c +++ b/libnm-glib/nm-secret-agent.c @@ -19,7 +19,6 @@ */ #include <config.h> -#include <ctype.h> #include <string.h> #include <dbus/dbus-glib-lowlevel.h> @@ -766,7 +765,7 @@ validate_identifier (const char *identifier) /* FIXME: do complete validation here */ while (p && *p) { - if (!isalnum (*p) && (*p != '_') && (*p != '-') && (*p != '.')) + if (!g_ascii_isalnum (*p) && (*p != '_') && (*p != '-') && (*p != '.')) return FALSE; if ((*p == '.') && (*(p + 1) == '.')) return FALSE; |