aboutsummaryrefslogtreecommitdiffstats
path: root/epan/uat.c
diff options
context:
space:
mode:
authorGuy Harris <guy@alum.mit.edu>2014-10-17 16:10:53 -0700
committerGuy Harris <guy@alum.mit.edu>2014-10-17 23:11:18 +0000
commit033f096ee909b63c0692b80416797f743940d054 (patch)
tree0ec827ec1bfa5a7893c19e81f27d782797a66644 /epan/uat.c
parent344c2bbb5e2a23764fe21adeaf2439d267960a96 (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: Ieceb93029252f646397b6488f2df8a57c6d2a23d Reviewed-on: https://code.wireshark.org/review/4794 Reviewed-by: Guy Harris <guy@alum.mit.edu>
Diffstat (limited to 'epan/uat.c')
-rw-r--r--epan/uat.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/epan/uat.c b/epan/uat.c
index 48da1c214b..076ac48e5a 100644
--- a/epan/uat.c
+++ b/epan/uat.c
@@ -30,7 +30,6 @@
#include <stdio.h>
#include <string.h>
#include <errno.h>
-#include <ctype.h>
#include <stdarg.h>
#include <glib.h>
@@ -463,7 +462,7 @@ gboolean uat_fld_chk_oid(void* u1 _U_, const char* strptr, guint len, const void
}
for(i = 0; i < len; i++)
- if(!(isdigit(strptr[i]) || strptr[i] == '.')) {
+ if(!(g_ascii_isdigit(strptr[i]) || strptr[i] == '.')) {
*err = "Only digits [0-9] and \".\" allowed in an OID";
break;
}
@@ -647,7 +646,7 @@ char* uat_unesc(const char* si, guint in_len, guint* len_p) {
char c1 = *(s+1);
char c0 = *(s+2);
- if (isxdigit((guchar)c1) && isxdigit((guchar)c0)) {
+ if (g_ascii_isxdigit(c1) && g_ascii_isxdigit(c0)) {
*(p++) = (ws_xton(c1) * 0x10) + ws_xton(c0);
s += 2;
} else {