forked from osmocom/wireshark
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>
This commit is contained in:
parent
36e4e6fa0a
commit
5fc398c328
|
@ -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;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue