From 5fc398c3286fda408ad5cd4b5834d1b2778db86a Mon Sep 17 00:00:00 2001 From: Guy Harris Date: Fri, 17 Oct 2014 14:10:52 -0700 Subject: [PATCH] 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 --- wsutil/str_util.c | 4 +--- 1 file changed, 1 insertion(+), 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 #include "str_util.h" -#include - 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; }