diff options
author | deraadt <deraadt@openbsd.org> | 2013-12-04 02:18:05 +0000 |
---|---|---|
committer | deraadt <deraadt@openbsd.org> | 2013-12-04 02:18:05 +0000 |
commit | ff01f5f62b98010ba3037a3360de07effc223e32 (patch) | |
tree | 71c3fcb4f323112e9b3d2d39156c9edd5f90381f /usr.sbin/ypserv | |
parent | Stop security(8) whining about /etc/nsd.conf which has moved, pointed out (diff) | |
download | wireguard-openbsd-ff01f5f62b98010ba3037a3360de07effc223e32.tar.xz wireguard-openbsd-ff01f5f62b98010ba3037a3360de07effc223e32.zip |
ctype improvements; checked by okan
Diffstat (limited to 'usr.sbin/ypserv')
-rw-r--r-- | usr.sbin/ypserv/makedbm/makedbm.c | 12 | ||||
-rw-r--r-- | usr.sbin/ypserv/mknetid/mknetid.c | 14 | ||||
-rw-r--r-- | usr.sbin/ypserv/yppush/yppush.c | 4 | ||||
-rw-r--r-- | usr.sbin/ypserv/ypserv/acl.c | 28 |
4 files changed, 33 insertions, 25 deletions
diff --git a/usr.sbin/ypserv/makedbm/makedbm.c b/usr.sbin/ypserv/makedbm/makedbm.c index 9a1a7881dcc..98cfaf99997 100644 --- a/usr.sbin/ypserv/makedbm/makedbm.c +++ b/usr.sbin/ypserv/makedbm/makedbm.c @@ -1,4 +1,4 @@ -/* $OpenBSD: makedbm.c,v 1.30 2013/08/22 04:43:41 guenther Exp $ */ +/* $OpenBSD: makedbm.c,v 1.31 2013/12/04 02:18:05 deraadt Exp $ */ /* * Copyright (c) 1994-97 Mats O Jansson <moj@stacken.kth.se> @@ -231,13 +231,13 @@ create_database(char *infile, char *database, char *yp_input_file, p = (char *) &data_line; - k = p; /* save start of key */ - while (!isspace(*p)) { /* find first "space" */ - if (lflag && isupper(*p)) /* if force lower case */ - *p = (char)tolower(*p); /* fix it */ + k = p; /* save start of key */ + while (!isspace((unsigned char)*p)) { /* find first "space" */ + if (lflag && isupper((unsigned char)*p)) /* if force lower case */ + *p = (char)tolower((unsigned char)*p); /* fix it */ p++; } - while (isspace(*p)) { /* replace space with <NUL> */ + while (isspace((unsigned char)*p)) { /* replace space with <NUL> */ *p = '\0'; p++; } diff --git a/usr.sbin/ypserv/mknetid/mknetid.c b/usr.sbin/ypserv/mknetid/mknetid.c index 6dbbf3b876a..60de4acf1f2 100644 --- a/usr.sbin/ypserv/mknetid/mknetid.c +++ b/usr.sbin/ypserv/mknetid/mknetid.c @@ -1,4 +1,4 @@ -/* $OpenBSD: mknetid.c,v 1.19 2013/08/18 16:32:24 guenther Exp $ */ +/* $OpenBSD: mknetid.c,v 1.20 2013/12/04 02:18:05 deraadt Exp $ */ /* * Copyright (c) 1996 Mats O Jansson <moj@stacken.kth.se> @@ -394,9 +394,9 @@ print_hosts(FILE *pfile, char *fname, char *domain) p = (char *)&line; - while (!isspace(*p)) + while (!isspace((unsigned char)*p)) p++; /* find first "space" */ - while (isspace(*p)) + while (isspace((unsigned char)*p)) *p++ = '\0'; /* replace space with <NUL> */ u = p; @@ -404,7 +404,7 @@ print_hosts(FILE *pfile, char *fname, char *domain) if (*p == '\0') { p = NULL; } else { - if (!isspace(*p)) { + if (!isspace((unsigned char)*p)) { p++; } else { *p = '\0'; @@ -445,9 +445,9 @@ print_netid(FILE *mfile, char *fname) p = (char *)&line; k = p; /* save start of key */ - while (!isspace(*p)) + while (!isspace((unsigned char)*p)) p++; /* find first "space" */ - while (isspace(*p)) + while (isspace((unsigned char)*p)) *p++ = '\0'; /* replace space with <NUL> */ u = p; @@ -455,7 +455,7 @@ print_netid(FILE *mfile, char *fname) if (*p == '\0') { p = NULL; } else { - if (!isspace(*p)) { + if (!isspace((unsigned char)*p)) { p++; } else { *p = '\0'; diff --git a/usr.sbin/ypserv/yppush/yppush.c b/usr.sbin/ypserv/yppush/yppush.c index f828d5b88d1..f4873f702b5 100644 --- a/usr.sbin/ypserv/yppush/yppush.c +++ b/usr.sbin/ypserv/yppush/yppush.c @@ -1,4 +1,4 @@ -/* $OpenBSD: yppush.c,v 1.27 2009/10/27 23:59:58 deraadt Exp $ */ +/* $OpenBSD: yppush.c,v 1.28 2013/12/04 02:18:05 deraadt Exp $ */ /* * Copyright (c) 1995 Mats O Jansson <moj@stacken.kth.se> @@ -290,7 +290,7 @@ main(int argc, char *argv[]) } else { OrderNum=0; for (i=0; i<o.dsize-1; i++) { - if (!isdigit(o.dptr[i])) + if (!isdigit((unsigned char)o.dptr[i])) OrderNum=0xffffffff; } if (OrderNum != 0) { diff --git a/usr.sbin/ypserv/ypserv/acl.c b/usr.sbin/ypserv/ypserv/acl.c index 23a8a4a5ecd..468945bb4a9 100644 --- a/usr.sbin/ypserv/ypserv/acl.c +++ b/usr.sbin/ypserv/ypserv/acl.c @@ -1,4 +1,4 @@ -/* $OpenBSD: acl.c,v 1.14 2009/10/27 23:59:58 deraadt Exp $ */ +/* $OpenBSD: acl.c,v 1.15 2013/12/04 02:18:05 deraadt Exp $ */ /* * Copyright (c) 1994 Mats O Jansson <moj@stacken.kth.se> @@ -63,7 +63,8 @@ acl_read_line(FILE *fp, char *buf, int size) c = p = buf; l = ' '; while (*c != '\0') { - if (isspace(l) && isspace(*c)) { + if (isspace((unsigned char)l) && + isspace((unsigned char)*c)) { c++; } else { l = *c++; *p = l; p++; @@ -73,7 +74,7 @@ acl_read_line(FILE *fp, char *buf, int size) if (p != buf) { --p; - if (isspace(*p) != 0) { + if (isspace((unsigned char)*p) != 0) { *p = '\0'; } } @@ -159,7 +160,8 @@ acl_init(char *file) k = p; /* save start of verb */ i = 0; - while (*p != '\0' && !isspace(*p = (char)tolower(*p))) { + while (*p != '\0' && + !isspace((*p = tolower(*p)))) { p++; i++; } @@ -187,7 +189,8 @@ acl_init(char *file) (state == ACLS_ALLOW || state == ACLS_DENY)) { k = p; /* save start of verb */ i = 0; - while (*p != '\0' && !isspace(*p = (char)tolower(*p))) { + while (*p != '\0' && + !isspace((*p = tolower(*p)))) { p++; i++; } @@ -227,7 +230,8 @@ acl_init(char *file) k = p; /* save start of verb */ i = 0; - while (*p != '\0' && !isspace(*p = (char)tolower(*p))) { + while (*p != '\0' && + !isspace((*p = tolower(*p)))) { p++; i++; } @@ -297,7 +301,8 @@ acl_init(char *file) k = p; /* save start of verb */ i = 0; - while (*p != '\0' && !isspace(*p = (char)tolower(*p))) { + while (*p != '\0' && + !isspace((*p = tolower(*p)))) { p++; i++; } @@ -319,7 +324,8 @@ acl_init(char *file) k = p; /* save start of verb */ i = 0; - while (*p != '\0' && !isspace(*p = (char)tolower(*p))) { + while (*p != '\0' && + !isspace((*p = tolower(*p)))) { p++; i++; } @@ -444,7 +450,8 @@ acl_securenet(char *file) k = p; /* save start of verb */ i = 0; - while (*p != '\0' && !isspace(*p = (char)tolower(*p))) { + while (*p != '\0' && + !isspace((*p = tolower(*p)))) { p++; i++; } @@ -473,7 +480,8 @@ acl_securenet(char *file) k = p; /* save start of verb */ i = 0; - while (*p != '\0' && !isspace(*p = (char)tolower(*p))) { + while (*p != '\0' && + !isspace((*p = tolower(*p)))) { p++; i++; } |