aboutsummaryrefslogtreecommitdiffstats
path: root/text2pcap.c
diff options
context:
space:
mode:
authorGuy Harris <guy@alum.mit.edu>2014-10-17 16:42:40 -0700
committerGuy Harris <guy@alum.mit.edu>2014-10-17 23:43:09 +0000
commita91799ebfa3a3aac705132722e57acc92fe4eddb (patch)
tree0c0cc5ec7621cd63308ea11bff865dd0b05f7afb /text2pcap.c
parent19b7819694d328bdc17cd7d4812ed7f6edfd623d (diff)
Don't use ctype.h routines.
That avoids locale dependency and handles possibly-signed chars(which we weren't always doing before). Change-Id: I89e50678abb8c3e535081c92ca25bc1bab672c68 Reviewed-on: https://code.wireshark.org/review/4798 Reviewed-by: Guy Harris <guy@alum.mit.edu>
Diffstat (limited to 'text2pcap.c')
-rw-r--r--text2pcap.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/text2pcap.c b/text2pcap.c
index 8d218405e0..9b8b9ebd14 100644
--- a/text2pcap.c
+++ b/text2pcap.c
@@ -107,7 +107,6 @@
# define __EXTENSIONS__
#endif
-#include <ctype.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
@@ -1355,7 +1354,7 @@ parse_token (token_t token, char *str)
tmp_str[1] = pkt_lnstart[i*3+1];
tmp_str[2] = '\0';
/* it is a valid convertable string */
- if (!isxdigit(tmp_str[0]) || !isxdigit(tmp_str[0])) {
+ if (!g_ascii_isxdigit(tmp_str[0]) || !g_ascii_isxdigit(tmp_str[0])) {
break;
}
s2[i] = (char)strtoul(tmp_str, (char **)NULL, 16);