Cast ctype function arguments to unsigned char.
authormmcc <mmcc@openbsd.org>
Thu, 22 Oct 2015 23:55:51 +0000 (23:55 +0000)
committermmcc <mmcc@openbsd.org>
Thu, 22 Oct 2015 23:55:51 +0000 (23:55 +0000)
ok guenther@

lib/libc/gen/auth_subr.c
lib/libc/net/inet_network.c

index 26d93b4..0df70c4 100644 (file)
@@ -1,4 +1,4 @@
-/*     $OpenBSD: auth_subr.c,v 1.45 2015/09/14 16:09:13 tedu Exp $     */
+/*     $OpenBSD: auth_subr.c,v 1.46 2015/10/22 23:55:51 mmcc Exp $     */
 
 /*
  * Copyright (c) 2000-2002,2004 Todd C. Miller <Todd.Miller@courtesan.com>
@@ -363,7 +363,7 @@ auth_setenv(auth_session_t *as)
                        }
                } else
                if (!strncasecmp(line, BI_UNSETENV, sizeof(BI_UNSETENV)-1)) {
-                       if (isblank(line[sizeof(BI_UNSETENV) - 1])) {
+                       if (isblank((unsigned char)line[sizeof(BI_UNSETENV) - 1])) {
                                /* only do it once! */
                                line[2] = 'd'; line[3] = 'i'; line[4] = 'd';
                                line += sizeof(BI_UNSETENV) - 1;
index ef8f21b..7b0cf50 100644 (file)
@@ -1,4 +1,4 @@
-/*     $OpenBSD: inet_network.c,v 1.12 2015/09/13 21:36:08 guenther Exp $ */
+/*     $OpenBSD: inet_network.c,v 1.13 2015/10/22 23:55:51 mmcc Exp $ */
 /*
  * Copyright (c) 1983, 1993
  *     The Regents of the University of California.  All rights reserved.
@@ -71,7 +71,7 @@ again:
                *pp++ = val, cp++;
                goto again;
        }
-       if (*cp && !isspace(*cp))
+       if (*cp && !isspace((unsigned char)*cp))
                return (INADDR_NONE);
        *pp++ = val;
        n = pp - parts;