summaryrefslogtreecommitdiffstats
path: root/usr.sbin/amd
diff options
context:
space:
mode:
authorderaadt <deraadt@openbsd.org>2013-12-03 02:14:57 +0000
committerderaadt <deraadt@openbsd.org>2013-12-03 02:14:57 +0000
commit4daf5065e1df892220b5fb3c8cd93a969932478b (patch)
treed548256003417b66ffbaffe8066b8d61ceae6735 /usr.sbin/amd
parentKill usage of timeb.h for upcoming removal of libcompat. OK deraadt@ (diff)
downloadwireguard-openbsd-4daf5065e1df892220b5fb3c8cd93a969932478b.tar.xz
wireguard-openbsd-4daf5065e1df892220b5fb3c8cd93a969932478b.zip
ctype cleanups
ok okan
Diffstat (limited to 'usr.sbin/amd')
-rw-r--r--usr.sbin/amd/amd/amq_subr.c8
-rw-r--r--usr.sbin/amd/amd/info_file.c13
-rw-r--r--usr.sbin/amd/amd/mount_fs.c4
-rw-r--r--usr.sbin/amd/amd/util.c10
-rw-r--r--usr.sbin/amd/mk-amd-map/mk-amd-map.c12
5 files changed, 31 insertions, 16 deletions
diff --git a/usr.sbin/amd/amd/amq_subr.c b/usr.sbin/amd/amd/amq_subr.c
index 77d95e10daf..32db57943bd 100644
--- a/usr.sbin/amd/amd/amq_subr.c
+++ b/usr.sbin/amd/amd/amq_subr.c
@@ -32,7 +32,7 @@
* SUCH DAMAGE.
*
* from: @(#)amq_subr.c 8.1 (Berkeley) 6/6/93
- * $Id: amq_subr.c,v 1.12 2007/03/20 04:00:32 tedu Exp $
+ * $Id: amq_subr.c,v 1.13 2013/12/03 02:14:57 deraadt Exp $
*/
/*
@@ -202,7 +202,9 @@ struct svc_req *rqstp;
/*
* Find end of key
*/
- for (cp = (char *) s; *cp&&(!isascii(*cp)||!isspace(*cp)); cp++)
+ for (cp = (char *) s;
+ *cp&&(!isascii((unsigned char)*cp) || !isspace((unsigned char)*cp));
+ cp++)
;
if (!*cp) {
@@ -215,7 +217,7 @@ struct svc_req *rqstp;
/*
* Find start of value
*/
- while (isascii(*cp) && isspace(*cp))
+ while (isascii((unsigned char)*cp) && isspace((unsigned char)*cp))
cp++;
root_newmap(s, cp, (char *) 0);
diff --git a/usr.sbin/amd/amd/info_file.c b/usr.sbin/amd/amd/info_file.c
index 87f310bbded..21e29d41429 100644
--- a/usr.sbin/amd/amd/info_file.c
+++ b/usr.sbin/amd/amd/info_file.c
@@ -32,7 +32,7 @@
* SUCH DAMAGE.
*
* from: @(#)info_file.c 8.1 (Berkeley) 6/6/93
- * $Id: info_file.c,v 1.6 2007/03/20 04:00:32 tedu Exp $
+ * $Id: info_file.c,v 1.7 2013/12/03 02:14:57 deraadt Exp $
*/
/*
@@ -119,7 +119,9 @@ search_or_reload_file(FILE *fp, char *map, char *key, char **val, mnt_map *m,
/*
* Find start of key
*/
- for (kp = key_val; isascii(*kp) && isspace(*kp); kp++)
+ for (kp = key_val;
+ isascii((unsigned char)*kp) && isspace((unsigned char)*kp);
+ kp++)
;
/*
@@ -131,7 +133,9 @@ search_or_reload_file(FILE *fp, char *map, char *key, char **val, mnt_map *m,
/*
* Find end of key
*/
- for (cp = kp; *cp&&(!isascii(*cp)||!isspace(*cp)); cp++)
+ for (cp = kp; *cp &&
+ (!isascii((unsigned char)*cp) || !isspace((unsigned char)*cp));
+ cp++)
;
/*
@@ -141,7 +145,8 @@ search_or_reload_file(FILE *fp, char *map, char *key, char **val, mnt_map *m,
*cp++ = '\0';
if (fn || (*key == *kp && strcmp(key, kp) == 0)) {
- while (isascii(*cp) && isspace(*cp))
+ while (isascii((unsigned char)*cp) &&
+ isspace((unsigned char)*cp))
cp++;
if (*cp) {
/*
diff --git a/usr.sbin/amd/amd/mount_fs.c b/usr.sbin/amd/amd/mount_fs.c
index 08bc14fb23e..56644efdd31 100644
--- a/usr.sbin/amd/amd/mount_fs.c
+++ b/usr.sbin/amd/amd/mount_fs.c
@@ -32,7 +32,7 @@
* SUCH DAMAGE.
*
* from: @(#)mount_fs.c 8.1 (Berkeley) 6/6/93
- * $Id: mount_fs.c,v 1.10 2007/03/20 04:00:32 tedu Exp $
+ * $Id: mount_fs.c,v 1.11 2013/12/03 02:14:57 deraadt Exp $
*/
#include "am.h"
@@ -217,7 +217,7 @@ nextmntopt(char **p)
/*
* Skip past white space
*/
- while (isspace(*cp))
+ while (isspace((unsigned char)*cp))
cp++;
/*
* Word starts here
diff --git a/usr.sbin/amd/amd/util.c b/usr.sbin/amd/amd/util.c
index a1d4a78e24e..ed9e5e25471 100644
--- a/usr.sbin/amd/amd/util.c
+++ b/usr.sbin/amd/amd/util.c
@@ -32,7 +32,7 @@
* SUCH DAMAGE.
*
* from: @(#)util.c 8.1 (Berkeley) 6/6/93
- * $Id: util.c,v 1.11 2003/06/02 23:36:51 millert Exp $
+ * $Id: util.c,v 1.12 2013/12/03 02:14:57 deraadt Exp $
*/
/*
@@ -102,7 +102,9 @@ strsplit(char *s, int ch, int qc)
/*
* skip to split char
*/
- while (*s && (ch == ' ' ? (isascii(*s) && isspace(*s)) : *s == ch))
+ while (*s && (ch == ' ' ?
+ (isascii((unsigned char)*s) && isspace((unsigned char)*s)) :
+ *s == ch))
*s++ = '\0';
/*
@@ -119,7 +121,9 @@ strsplit(char *s, int ch, int qc)
/*
* skip to split char
*/
- while (*s && !(ch == ' ' ? (isascii(*s) && isspace(*s)) : *s == ch)) {
+ while (*s && !(ch == ' ' ?
+ (isascii((unsigned char)*s) && isspace((unsigned char)*s)) :
+ *s == ch)) {
if (*s++ == qc) {
/*
* Skip past string.
diff --git a/usr.sbin/amd/mk-amd-map/mk-amd-map.c b/usr.sbin/amd/mk-amd-map/mk-amd-map.c
index bf73019df85..1735a7772e5 100644
--- a/usr.sbin/amd/mk-amd-map/mk-amd-map.c
+++ b/usr.sbin/amd/mk-amd-map/mk-amd-map.c
@@ -32,7 +32,7 @@
* SUCH DAMAGE.
*
* from: @(#)mk-amd-map.c 8.1 (Berkeley) 6/28/93
- * $Id: mk-amd-map.c,v 1.10 2009/10/27 23:59:51 deraadt Exp $
+ * $Id: mk-amd-map.c,v 1.11 2013/12/03 02:14:58 deraadt Exp $
*/
/*
@@ -142,7 +142,9 @@ read_file(FILE *fp, char *map, void *db)
/*
* Find start of key
*/
- for (kp = key_val; isascii(*kp) && isspace(*kp); kp++)
+ for (kp = key_val;
+ isascii((unsigned char)*kp) && isspace((unsigned char)*kp);
+ kp++)
;
/*
@@ -154,7 +156,9 @@ read_file(FILE *fp, char *map, void *db)
/*
* Find end of key
*/
- for (cp = kp; *cp&&(!isascii(*cp)||!isspace(*cp)); cp++)
+ for (cp = kp; *cp &&
+ (!isascii((unsigned char)*cp) || !isspace((unsigned char)*cp));
+ cp++)
;
/*
@@ -163,7 +167,7 @@ read_file(FILE *fp, char *map, void *db)
*/
if (*cp)
*cp++ = '\0';
- while (isascii(*cp) && isspace(*cp))
+ while (isascii((unsigned char)*cp) && isspace((unsigned char)*cp))
cp++;
if (*kp == '+') {
fprintf(stderr, "Can't interpolate %s\n", kp);