diff options
author | Guy Harris <guy@alum.mit.edu> | 2014-10-16 18:26:03 -0700 |
---|---|---|
committer | Guy Harris <guy@alum.mit.edu> | 2014-10-17 01:26:27 +0000 |
commit | 0d9b449ae95f26e86f8b433c7f4f99341443b048 (patch) | |
tree | 98a6a9fd338b1451e8cd49574f07876848740658 /epan/ftypes | |
parent | 359a32f735230a5103498d21bbb6ebf9372c88b0 (diff) |
Don't use <ctype.h> macros.
They're locale-dependent (although those *particular* ones might not
be).
Remove no-longer necessary (or not-even-necessary-before-this-change)
includes of <ctype.h>
Change-Id: I1384e3ae4ccba6af9220a08773abcde7ea320573
Reviewed-on: https://code.wireshark.org/review/4755
Reviewed-by: Guy Harris <guy@alum.mit.edu>
Diffstat (limited to 'epan/ftypes')
-rw-r--r-- | epan/ftypes/ftype-bytes.c | 1 | ||||
-rw-r--r-- | epan/ftypes/ftype-guid.c | 3 | ||||
-rw-r--r-- | epan/ftypes/ftype-string.c | 1 | ||||
-rw-r--r-- | epan/ftypes/ftype-time.c | 5 |
4 files changed, 3 insertions, 7 deletions
diff --git a/epan/ftypes/ftype-bytes.c b/epan/ftypes/ftype-bytes.c index 059c31a9de..8231406f38 100644 --- a/epan/ftypes/ftype-bytes.c +++ b/epan/ftypes/ftype-bytes.c @@ -23,7 +23,6 @@ #include <stdio.h> #include <ftypes-int.h> #include <string.h> -#include <ctype.h> #include <epan/addr_resolv.h> #include <epan/strutil.h> #include <epan/oids.h> diff --git a/epan/ftypes/ftype-guid.c b/epan/ftypes/ftype-guid.c index 0a57b53c6e..c7e94d5ef0 100644 --- a/epan/ftypes/ftype-guid.c +++ b/epan/ftypes/ftype-guid.c @@ -22,7 +22,6 @@ #include <string.h> #include <stdlib.h> -#include <ctype.h> #include <ftypes-int.h> #include <epan/guid-utils.h> @@ -53,7 +52,7 @@ get_guid(const char *s, e_guid_t *guid) return FALSE; for (i=0; i<n; i++) { if (fmt[i] == 'X') { - if (!isxdigit((guchar)s[i])) + if (!g_ascii_isxdigit(s[i])) return FALSE; } else { if (s[i] != fmt[i]) diff --git a/epan/ftypes/ftype-string.c b/epan/ftypes/ftype-string.c index 3893823b28..6c95e70ebd 100644 --- a/epan/ftypes/ftype-string.c +++ b/epan/ftypes/ftype-string.c @@ -27,7 +27,6 @@ #define CMP_MATCHES cmp_matches -#include <ctype.h> #include <strutil.h> static void diff --git a/epan/ftypes/ftype-time.c b/epan/ftypes/ftype-time.c index 8479a4c04b..841e8b4e62 100644 --- a/epan/ftypes/ftype-time.c +++ b/epan/ftypes/ftype-time.c @@ -22,7 +22,6 @@ #include <stdio.h> #include <stdlib.h> -#include <ctype.h> #include <string.h> /* @@ -140,7 +139,7 @@ get_nsecs(const char *startp, int *nsecs) while (p != startp) { p--; - if (!isdigit((unsigned char)*p)) { + if (!g_ascii_isdigit(*p)) { /* * Not a digit - error. */ @@ -264,7 +263,7 @@ absolute_val_from_string(fvalue_t *fv, const char *s, LogFunc logfunc) if (*curptr != '.') goto fail; /* it's not */ curptr++; /* skip the "." */ - if (!isdigit((unsigned char)*curptr)) + if (!g_ascii_isdigit((unsigned char)*curptr)) goto fail; /* not a digit, so not valid */ if (!get_nsecs(curptr, &fv->value.time.nsecs)) goto fail; |