From 1da6c35a6d1691df9712cb9456f36602ffdacb6b Mon Sep 17 00:00:00 2001 From: softins Date: Tue, 27 Jul 2004 14:43:58 +0000 Subject: [PATCH] Added a couple of casts to quiet the compiler. No need to test isascii(c) before isdigit(c) or isxdigit(c). --- src/core/inet.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/core/inet.c b/src/core/inet.c index d1a2c74b..d87065e1 100644 --- a/src/core/inet.c +++ b/src/core/inet.c @@ -232,12 +232,12 @@ inet_chksum_pbuf(struct pbuf *p) base = 8; } for (;;) { - if (isascii(c) && isdigit(c)) { - val = (val * base) + (c - '0'); + if (isdigit(c)) { + val = (val * base) + (int)(c - '0'); c = *++cp; - } else if (base == 16 && isascii(c) && isxdigit(c)) { + } else if (base == 16 && isxdigit(c)) { val = (val << 4) | - (c + 10 - (islower(c) ? 'a' : 'A')); + (int)(c + 10 - (islower(c) ? 'a' : 'A')); c = *++cp; } else break;