summaryrefslogtreecommitdiffstats
path: root/usr.sbin/amd/amd/info_file.c
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/amd/info_file.c
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/amd/info_file.c')
-rw-r--r--usr.sbin/amd/amd/info_file.c13
1 files changed, 9 insertions, 4 deletions
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) {
/*