From owner-freebsd-current Wed Jan 27 18:07:23 1999 Return-Path: Received: (from majordom@localhost) by hub.freebsd.org (8.8.8/8.8.8) id SAA18403 for freebsd-current-outgoing; Wed, 27 Jan 1999 18:07:23 -0800 (PST) (envelope-from owner-freebsd-current@FreeBSD.ORG) Received: from apollo.backplane.com (apollo.backplane.com [209.157.86.2]) by hub.freebsd.org (8.8.8/8.8.8) with ESMTP id SAA18391 for ; Wed, 27 Jan 1999 18:07:19 -0800 (PST) (envelope-from dillon@apollo.backplane.com) Received: (from dillon@localhost) by apollo.backplane.com (8.9.2/8.9.1) id SAA88572; Wed, 27 Jan 1999 18:07:18 -0800 (PST) (envelope-from dillon) Date: Wed, 27 Jan 1999 18:07:18 -0800 (PST) From: Matthew Dillon Message-Id: <199901280207.SAA88572@apollo.backplane.com> To: Archie Cobbs Cc: current@FreeBSD.ORG Subject: Re: kern/subr_scanf array index of signed char References: <199901280204.SAA19979@bubba.whistle.com> Sender: owner-freebsd-current@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG :Matthew Dillon writes: :> goto match_failure; :> } else { :> p0 = p = va_arg(ap, char *); :> - while (ccltab[*inp]) { :> + while (ccltab[(int)(unsigned char)*inp]) { :> inr--; :> *p++ = *inp++; :> if (--width == 0) : :Just curious.. why do you need the "(int)" cast? : :-Archie Actually, it could very well be that I don't. I didn't want to spend the time to check to see if the compiler warned on unsigned-char array indexes. You can change it back if unsigned char array indexes do not produce a warning. -Matt :___________________________________________________________________________ :Archie Cobbs * Whistle Communications, Inc. * http://www.whistle.com : :To Unsubscribe: send mail to majordomo@FreeBSD.org :with "unsubscribe freebsd-current" in the body of the message : Matthew Dillon To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-current" in the body of the message