Source-Changes-HG archive

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

[src/trunk]: src/sys/arch/atari/stand/edahdi Add casts to unsigned char for t...



details:   https://anonhg.NetBSD.org/src/rev/480f9fc3db60
branches:  trunk
changeset: 571166:480f9fc3db60
user:      he <he%NetBSD.org@localhost>
date:      Fri Nov 12 10:18:46 2004 +0000

description:
Add casts to unsigned char for the arguments to the ctype.h macros/functions.

diffstat:

 sys/arch/atari/stand/edahdi/edahdi.c |  10 +++++-----
 1 files changed, 5 insertions(+), 5 deletions(-)

diffs (36 lines):

diff -r 3707d1e06b08 -r 480f9fc3db60 sys/arch/atari/stand/edahdi/edahdi.c
--- a/sys/arch/atari/stand/edahdi/edahdi.c      Fri Nov 12 09:52:15 2004 +0000
+++ b/sys/arch/atari/stand/edahdi/edahdi.c      Fri Nov 12 10:18:46 2004 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: edahdi.c,v 1.3 2000/02/15 10:14:55 leo Exp $   */
+/*     $NetBSD: edahdi.c,v 1.4 2004/11/12 10:18:46 he Exp $    */
 
 /*
  * Copyright (c) 1996 Leo Weppelman, Waldi Ravens.
@@ -302,12 +302,12 @@
                                rv = T_PREV;
                                goto out;
                        default :
-                               if (isspace(*c)) {
+                               if (isspace((unsigned char)*c)) {
                                        if (rv == T_INVAL)
                                                break;
                                        goto out;
                                }
-                               else if (isdigit(*c)) {
+                               else if (isdigit((unsigned char)*c)) {
                                        *value = (10 * *value) + *c - '0';
                                        rv = T_NUMBER;
                                }
@@ -334,9 +334,9 @@
        if (fgets(buf, sizeof(buf), stdin) == NULL)
                return (NULL);
        for (n = 0; n < 3; n++) {
-               if (!isalpha(buf[n]))
+               if (!isalpha((unsigned char)buf[n]))
                        return (NULL);
-               buf[n] = toupper(buf[n]);
+               buf[n] = toupper((unsigned char)buf[n]);
        }
        buf[3] = '\0';
        return (buf);



Home | Main Index | Thread Index | Old Index