From 14f2cd7f1f8671a4b9d087659654425235793e7a Mon Sep 17 00:00:00 2001 From: dillon Date: Sun, 14 Feb 1999 20:58:21 +0000 Subject: [PATCH] Only needed to cast array index from char to unsigned char, did not also have to cast it to int. (int)(unsigned char)char_exp -> (unsigned char)char_exp. --- sys/kern/subr_scanf.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/sys/kern/subr_scanf.c b/sys/kern/subr_scanf.c index b24d7baa3ceb..6d65d98720bf 100644 --- a/sys/kern/subr_scanf.c +++ b/sys/kern/subr_scanf.c @@ -33,7 +33,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $Id: subr_scanf.c,v 1.3 1999/01/28 00:57:47 dillon Exp $ + * $Id: subr_scanf.c,v 1.4 1999/01/29 08:09:32 dillon Exp $ * From: Id: vfscanf.c,v 1.13 1998/09/25 12:20:27 obrien Exp */ @@ -323,7 +323,7 @@ again: c = *fmt++; /* take only those things in the class */ if (flags & SUPPRESS) { n = 0; - while (ccltab[(int)(unsigned char)*inp]) { + while (ccltab[(unsigned char)*inp]) { n++, inr--, inp++; if (--width == 0) break; @@ -337,7 +337,7 @@ again: c = *fmt++; goto match_failure; } else { p0 = p = va_arg(ap, char *); - while (ccltab[(int)(unsigned char)*inp]) { + while (ccltab[(unsigned char)*inp]) { inr--; *p++ = *inp++; if (--width == 0)