From b92ebafe8ea74167b21c945bc914440c9416ee67 Mon Sep 17 00:00:00 2001 From: guy Date: Sat, 28 Jul 2001 22:56:34 +0000 Subject: Cast the argument to macros to "unsigned char", to eliminate GCC warnings and to keep the macros from referring outside an array when handed bytes with the 8th bit set. --- nametoaddr.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'nametoaddr.c') diff --git a/nametoaddr.c b/nametoaddr.c index 63e14ac..d9a0389 100644 --- a/nametoaddr.c +++ b/nametoaddr.c @@ -24,7 +24,7 @@ #ifndef lint static const char rcsid[] = - "@(#) $Header: /tcpdump/master/libpcap/nametoaddr.c,v 1.59 2001-06-27 05:11:48 guy Exp $ (LBL)"; + "@(#) $Header: /tcpdump/master/libpcap/nametoaddr.c,v 1.60 2001-07-28 22:56:35 guy Exp $ (LBL)"; #endif #ifdef HAVE_CONFIG_H @@ -313,7 +313,7 @@ pcap_ether_aton(const char *s) if (*s == ':') s += 1; d = xdtoi(*s++); - if (isxdigit(*s)) { + if (isxdigit((unsigned char)*s)) { d <<= 4; d |= xdtoi(*s++); } -- cgit v1.2.3