aboutsummaryrefslogtreecommitdiffstats
path: root/epan/range.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/range.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/range.c')
-rw-r--r--epan/range.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/epan/range.c b/epan/range.c
index 05bda35933..6783ec9382 100644
--- a/epan/range.c
+++ b/epan/range.c
@@ -27,7 +27,6 @@
#include <string.h>
#include <stdlib.h>
-#include <ctype.h>
#include <errno.h>
#include <glib.h>
@@ -146,7 +145,7 @@ range_convert_str_work(range_t **rangep, const gchar *es, guint32 max_value,
if (c == '-') {
/* Subrange starts with 1. */
range->ranges[range->nranges].low = 1;
- } else if (isdigit((unsigned char)c)) {
+ } else if (g_ascii_isdigit(c)) {
/* Subrange starts with the specified number */
errno = 0;
val = strtoul(p, &endp, 10);
@@ -192,7 +191,7 @@ range_convert_str_work(range_t **rangep, const gchar *es, guint32 max_value,
* with max_value.
*/
range->ranges[range->nranges].high = max_value;
- } else if (isdigit((unsigned char)c)) {
+ } else if (g_ascii_isdigit(c)) {
/* Subrange ends with the specified number. */
errno = 0;
val = strtoul(p, &endp, 10);