Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/dist/ipf/lib Cast isdigit() argument to unsigned char.



details:   https://anonhg.NetBSD.org/src/rev/a04ad63e6dc2
branches:  trunk
changeset: 580970:a04ad63e6dc2
user:      christos <christos%NetBSD.org@localhost>
date:      Wed May 18 00:15:52 2005 +0000

description:
Cast isdigit() argument to unsigned char.

diffstat:

 dist/ipf/lib/addicmp.c |  6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

diffs (27 lines):

diff -r fe9c15ac27b4 -r a04ad63e6dc2 dist/ipf/lib/addicmp.c
--- a/dist/ipf/lib/addicmp.c    Tue May 17 21:54:06 2005 +0000
+++ b/dist/ipf/lib/addicmp.c    Wed May 18 00:15:52 2005 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: addicmp.c,v 1.5 2005/02/08 07:01:53 martti Exp $       */
+/*     $NetBSD: addicmp.c,v 1.6 2005/05/18 00:15:52 christos Exp $     */
 
 /*
  * Copyright (C) 1993-2001 by Darren Reed.
@@ -36,7 +36,7 @@
                return -1;
        if (!fp->fr_proto)      /* to catch lusers */
                fp->fr_proto = IPPROTO_ICMP;
-       if (ISDIGIT(***cp)) {
+       if (ISDIGIT((unsigned char)***cp)) {
                if (!ratoi(**cp, &i, 0, 255)) {
                        fprintf(stderr,
                                "%d: Invalid icmp-type (%s) specified\n",
@@ -70,7 +70,7 @@
        if (**cp && strcasecmp("code", **cp))
                return 0;
        (*cp)++;
-       if (ISDIGIT(***cp)) {
+       if (ISDIGIT((unsigned char)***cp)) {
                if (!ratoi(**cp, &i, 0, 255)) {
                        fprintf(stderr,
                                "%d: Invalid icmp code (%s) specified\n",



Home | Main Index | Thread Index | Old Index