summaryrefslogtreecommitdiff
path: root/usr.sbin/config/main.c
diff options
context:
space:
mode:
authorTheo de Raadt <deraadt@cvs.openbsd.org>2013-11-23 17:38:16 +0000
committerTheo de Raadt <deraadt@cvs.openbsd.org>2013-11-23 17:38:16 +0000
commit0a53ec2461502f772a9dd430223ba7a507094c59 (patch)
treefd97128a5cd38cc401ea77935a38e7cade49f72c /usr.sbin/config/main.c
parentcd9f8458f2105861de013104373fdf11870cced9 (diff)
unsigned char casts for ctype
ok jca
Diffstat (limited to 'usr.sbin/config/main.c')
-rw-r--r--usr.sbin/config/main.c11
1 files changed, 7 insertions, 4 deletions
diff --git a/usr.sbin/config/main.c b/usr.sbin/config/main.c
index e1926c7b984..d07cb8abcc7 100644
--- a/usr.sbin/config/main.c
+++ b/usr.sbin/config/main.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: main.c,v 1.45 2013/10/29 15:37:56 espie Exp $ */
+/* $OpenBSD: main.c,v 1.46 2013/11/23 17:38:15 deraadt Exp $ */
/* $NetBSD: main.c,v 1.22 1997/02/02 21:12:33 thorpej Exp $ */
/*
@@ -360,7 +360,8 @@ defoption(const char *name)
*/
low = emalloc(strlen(name) + 1);
for (n = name, p = low; (c = *n) != '\0'; n++)
- *p++ = isupper(c) ? tolower(c) : c;
+ *p++ = isupper((unsigned char)c) ?
+ tolower((unsigned char)c) : c;
*p = 0;
n = intern(low);
@@ -406,7 +407,8 @@ removeoption(const char *name)
low = emalloc(strlen(name) + 1);
/* make lowercase, then remove from select table */
for (n = name, p = low; (c = *n) != '\0'; n++)
- *p++ = isupper(c) ? tolower(c) : c;
+ *p++ = isupper((unsigned char)c) ?
+ tolower((unsigned char)c) : c;
*p = 0;
n = intern(low);
free(low);
@@ -429,7 +431,8 @@ addoption(const char *name, const char *value)
low = emalloc(strlen(name) + 1);
/* make lowercase, then add to select table */
for (n = name, p = low; (c = *n) != '\0'; n++)
- *p++ = isupper(c) ? tolower(c) : c;
+ *p++ = isupper((unsigned char)c) ?
+ tolower((unsigned char)c) : c;
*p = 0;
n = intern(low);
free(low);