diff options
author | Guy Harris <guy@alum.mit.edu> | 2007-07-13 23:20:02 +0000 |
---|---|---|
committer | Guy Harris <guy@alum.mit.edu> | 2007-07-13 23:20:02 +0000 |
commit | 3ccd39aec7858c2b6dcabd87d0ce78fdb00069f2 (patch) | |
tree | 2e3f8e5e5a063e0db6e8aa2d2cd8b0cee759755f /wiretap/catapult_dct2000.c | |
parent | 7e951091181953a8f25aed1ef4b73736e3a9778e (diff) |
Fix more ctype.h calls - casting to "int" suppresses the warning, but
doesn't fix the problem, as the sign extension is still done; you have
to cast to "guchar".
svn path=/trunk/; revision=22304
Diffstat (limited to 'wiretap/catapult_dct2000.c')
-rw-r--r-- | wiretap/catapult_dct2000.c | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/wiretap/catapult_dct2000.c b/wiretap/catapult_dct2000.c index 2eb3ac4df8..fcc9ae4efb 100644 --- a/wiretap/catapult_dct2000.c +++ b/wiretap/catapult_dct2000.c @@ -784,7 +784,7 @@ gboolean parse_line(gint line_length, gint *seconds, gint *useconds, /* Read context name until find '.' */ for (n=0; linebuff[n] != '.' && (n < MAX_CONTEXT_NAME) && (n+1 < line_length); n++) { - if (!isalnum((int)linebuff[n]) && (linebuff[n] != '_')) + if (!isalnum((guchar)linebuff[n]) && (linebuff[n] != '_')) { return FALSE; } @@ -810,7 +810,7 @@ gboolean parse_line(gint line_length, gint *seconds, gint *useconds, (linebuff[n] != '/') && (port_digits <= MAX_PORT_DIGITS) && (n+1 < line_length); n++, port_digits++) { - if (!isdigit((int)linebuff[n])) + if (!isdigit((guchar)linebuff[n])) { return FALSE; } @@ -837,7 +837,7 @@ gboolean parse_line(gint line_length, gint *seconds, gint *useconds, (linebuff[n] != '/') && (protocol_chars < MAX_PROTOCOL_NAME) && (n < line_length); n++, protocol_chars++) { - if (!isalnum((int)linebuff[n]) && linebuff[n] != '_') + if (!isalnum((guchar)linebuff[n]) && linebuff[n] != '_') { return FALSE; } @@ -861,10 +861,10 @@ gboolean parse_line(gint line_length, gint *seconds, gint *useconds, /* Following the / is the variant number. No digits indicate 1 */ for (variant_digits = 0; - (isdigit((int)linebuff[n])) && (variant_digits <= MAX_VARIANT_DIGITS) && (n+1 < line_length); + (isdigit((guchar)linebuff[n])) && (variant_digits <= MAX_VARIANT_DIGITS) && (n+1 < line_length); n++, variant_digits++) { - if (!isdigit((int)linebuff[n])) + if (!isdigit((guchar)linebuff[n])) { return FALSE; } @@ -893,11 +893,11 @@ gboolean parse_line(gint line_length, gint *seconds, gint *useconds, n++; for (outhdr_chars = 0; - (isdigit((int)linebuff[n]) || linebuff[n] == ',') && + (isdigit((guchar)linebuff[n]) || linebuff[n] == ',') && (outhdr_chars <= MAX_OUTHDR_NAME) && (n+1 < line_length); n++, outhdr_chars++) { - if (!isdigit((int)linebuff[n]) && (linebuff[n] != ',')) + if (!isdigit((guchar)linebuff[n]) && (linebuff[n] != ',')) { return FALSE; } @@ -1071,7 +1071,7 @@ gboolean parse_line(gint line_length, gint *seconds, gint *useconds, /* Find and read the timestamp */ /* Now scan to the next digit, which should be the start of the timestamp */ - for (; !isdigit((int)linebuff[n]) && (n < line_length); n++); + for (; !isdigit((guchar)linebuff[n]) && (n < line_length); n++); if (n >= line_length) { return FALSE; @@ -1086,7 +1086,7 @@ gboolean parse_line(gint line_length, gint *seconds, gint *useconds, (n < line_length); n++, seconds_chars++) { - if (!isdigit((int)linebuff[n])) + if (!isdigit((guchar)linebuff[n])) { /* Found a non-digit before decimal point. Fail */ return FALSE; @@ -1118,7 +1118,7 @@ gboolean parse_line(gint line_length, gint *seconds, gint *useconds, (n < line_length); n++, subsecond_decimals_chars++) { - if (!isdigit((int)linebuff[n])) + if (!isdigit((guchar)linebuff[n])) { return FALSE; } |