Source-Changes-HG archive

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

[src/trunk]: src/sbin/newfs Add a cast to unsigned char when using a ctype fu...



details:   https://anonhg.NetBSD.org/src/rev/1548dad403a0
branches:  trunk
changeset: 571276:1548dad403a0
user:      he <he%NetBSD.org@localhost>
date:      Mon Nov 15 12:21:29 2004 +0000

description:
Add a cast to unsigned char when using a ctype function/macro.

diffstat:

 sbin/newfs/newfs.c |  6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

diffs (27 lines):

diff -r af34e34b98fc -r 1548dad403a0 sbin/newfs/newfs.c
--- a/sbin/newfs/newfs.c        Mon Nov 15 10:31:50 2004 +0000
+++ b/sbin/newfs/newfs.c        Mon Nov 15 12:21:29 2004 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: newfs.c,v 1.84 2004/09/07 02:18:06 lukem Exp $ */
+/*     $NetBSD: newfs.c,v 1.85 2004/11/15 12:21:29 he Exp $    */
 
 /*
  * Copyright (c) 1983, 1989, 1993, 1994
@@ -78,7 +78,7 @@
 #if 0
 static char sccsid[] = "@(#)newfs.c    8.13 (Berkeley) 5/1/95";
 #else
-__RCSID("$NetBSD: newfs.c,v 1.84 2004/09/07 02:18:06 lukem Exp $");
+__RCSID("$NetBSD: newfs.c,v 1.85 2004/11/15 12:21:29 he Exp $");
 #endif
 #endif /* not lint */
 
@@ -747,7 +747,7 @@
                 */
                strlcpy(specname, s, sizeof(specname));
                cp = specname + strlen(specname) - 1;
-               if (!isdigit(*cp))
+               if (!isdigit((unsigned char)*cp))
                        *cp = 'c';
                cfd = open(specname, O_WRONLY);
                if (cfd < 0)



Home | Main Index | Thread Index | Old Index