From 9649fe0209de88926626165951e2db3043b73ee6 Mon Sep 17 00:00:00 2001 From: dsl Date: Fri, 5 Nov 2004 21:30:31 +0000 Subject: Add (unsigned char) cast to ctype functions --- arithmetic/arithmetic.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'arithmetic') diff --git a/arithmetic/arithmetic.c b/arithmetic/arithmetic.c index 29094c9d..8eff98ee 100644 --- a/arithmetic/arithmetic.c +++ b/arithmetic/arithmetic.c @@ -1,4 +1,4 @@ -/* $NetBSD: arithmetic.c,v 1.20 2004/01/27 20:30:28 jsm Exp $ */ +/* $NetBSD: arithmetic.c,v 1.21 2004/11/05 21:30:31 dsl Exp $ */ /* * Copyright (c) 1989, 1993 @@ -42,7 +42,7 @@ __COPYRIGHT("@(#) Copyright (c) 1989, 1993\n\ #if 0 static char sccsid[] = "@(#)arithmetic.c 8.1 (Berkeley) 5/31/93"; #else -__RCSID("$NetBSD: arithmetic.c,v 1.20 2004/01/27 20:30:28 jsm Exp $"); +__RCSID("$NetBSD: arithmetic.c,v 1.21 2004/11/05 21:30:31 dsl Exp $"); #endif #endif /* not lint */ @@ -246,8 +246,8 @@ retry: (void)printf("\n"); return(EOF); } - for (p = line; *p && isspace(*p); ++p); - if (!isdigit(*p)) { + for (p = line; *p && isspace((unsigned char)*p); ++p); + if (!isdigit((unsigned char)*p)) { (void)printf("Please type a number.\n"); continue; } -- cgit v1.2.3-56-ge451