diff options
author | Guy Harris <guy@alum.mit.edu> | 2014-10-17 14:10:52 -0700 |
---|---|---|
committer | Guy Harris <guy@alum.mit.edu> | 2014-10-17 21:11:44 +0000 |
commit | 5fc398c3286fda408ad5cd4b5834d1b2778db86a (patch) | |
tree | eeec2e514433ee61daed510ff10d42ad91218351 | |
parent | 36e4e6fa0a0e30da4e5fe27df2c43d797c41e6bc (diff) |
Don't use ctype.h routines.
That avoids locale dependency and handles possibly-signed chars (which
we weren't doing before).
Change-Id: I189222eff624ad2d2e960bc0b69f3f22d35f351f
Reviewed-on: https://code.wireshark.org/review/4787
Reviewed-by: Guy Harris <guy@alum.mit.edu>
-rw-r--r-- | wsutil/str_util.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/wsutil/str_util.c b/wsutil/str_util.c index 77a0a17b40..c08d96d02f 100644 --- a/wsutil/str_util.c +++ b/wsutil/str_util.c @@ -25,8 +25,6 @@ #include <glib.h> #include "str_util.h" -#include <ctype.h> - int ws_xton(char ch) { @@ -103,7 +101,7 @@ isdigit_string(guchar *str) /* Loop until we reach the end of the string (a null) */ for(pos = 0; str[pos] != '\0'; pos++){ - if(!isdigit(str[pos])){ + if(!g_ascii_isdigit(str[pos])){ /* The string contains a non-digit character */ return FALSE; } |