Source-Changes-HG archive

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

[src/trunk]: src/usr.sbin/wiconfig cast isprint() parameter to (unsigned char...



details:   https://anonhg.NetBSD.org/src/rev/77e5e54303ff
branches:  trunk
changeset: 499595:77e5e54303ff
user:      jdolecek <jdolecek%NetBSD.org@localhost>
date:      Fri Nov 24 09:53:36 2000 +0000

description:
cast isprint() parameter to (unsigned char) - it looses if the character has high
bit set when the architecture is using signed char by default
This fixes bin/11556 by Michael Eriksson.

diffstat:

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

diffs (27 lines):

diff -r d7a1d4d56088 -r 77e5e54303ff usr.sbin/wiconfig/wiconfig.c
--- a/usr.sbin/wiconfig/wiconfig.c      Fri Nov 24 09:42:09 2000 +0000
+++ b/usr.sbin/wiconfig/wiconfig.c      Fri Nov 24 09:53:36 2000 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: wiconfig.c,v 1.9 2000/08/23 19:01:06 jhawk Exp $       */
+/*     $NetBSD: wiconfig.c,v 1.10 2000/11/24 09:53:36 jdolecek Exp $   */
 
 /*
  * Copyright (c) 1997, 1998, 1999
@@ -69,7 +69,7 @@
 static const char copyright[] = "@(#) Copyright (c) 1997, 1998, 1999\
        Bill Paul. All rights reserved.";
 static const char rcsid[] =
-       "@(#) $Id: wiconfig.c,v 1.9 2000/08/23 19:01:06 jhawk Exp $";
+       "@(#) $Id: wiconfig.c,v 1.10 2000/11/24 09:53:36 jdolecek Exp $";
 #endif
 
 struct wi_table {
@@ -359,7 +359,7 @@
                 k = &keys->wi_keys[i];
                 ptr = (char *)k->wi_keydat;
                 for (j = 0; j < k->wi_keylen; j++) {
-                       if (!isprint(ptr[j])) {
+                       if (!isprint((unsigned char) ptr[j])) {
                                bn = 1;
                                break;
                        }



Home | Main Index | Thread Index | Old Index