summaryrefslogtreecommitdiffstats
path: root/usr.sbin/lpr
diff options
context:
space:
mode:
authorderaadt <deraadt@openbsd.org>2013-11-24 21:32:31 +0000
committerderaadt <deraadt@openbsd.org>2013-11-24 21:32:31 +0000
commit0c4db8c162e3fc65ffededbef1212e67215582ff (patch)
treefd5570ccb94cab6b8ed6b07ffd396382ab965fd6 /usr.sbin/lpr
parentAdd comments to ACS table matching terminfo(5). (diff)
downloadwireguard-openbsd-0c4db8c162e3fc65ffededbef1212e67215582ff.tar.xz
wireguard-openbsd-0c4db8c162e3fc65ffededbef1212e67215582ff.zip
more ctype cleanups
checked by jca
Diffstat (limited to 'usr.sbin/lpr')
-rw-r--r--usr.sbin/lpr/common_source/displayq.c4
-rw-r--r--usr.sbin/lpr/common_source/rmjob.c4
-rw-r--r--usr.sbin/lpr/lpc/cmds.c8
-rw-r--r--usr.sbin/lpr/lpd/lpd.c10
-rw-r--r--usr.sbin/lpr/lpd/printjob.c4
-rw-r--r--usr.sbin/lpr/lpq/lpq.c4
-rw-r--r--usr.sbin/lpr/lpr/lpr.c4
-rw-r--r--usr.sbin/lpr/lprm/lprm.c4
-rw-r--r--usr.sbin/lpr/pac/pac.c12
9 files changed, 27 insertions, 27 deletions
diff --git a/usr.sbin/lpr/common_source/displayq.c b/usr.sbin/lpr/common_source/displayq.c
index ffc15f5fa7f..4db659cc62c 100644
--- a/usr.sbin/lpr/common_source/displayq.c
+++ b/usr.sbin/lpr/common_source/displayq.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: displayq.c,v 1.33 2013/10/27 18:49:25 guenther Exp $ */
+/* $OpenBSD: displayq.c,v 1.34 2013/11/24 21:32:32 deraadt Exp $ */
/* $NetBSD: displayq.c,v 1.21 2001/08/30 00:51:50 itojun Exp $ */
/*
@@ -412,7 +412,7 @@ inlist(char *name, char *file)
/*
* Check the request list
*/
- for (n = 0, cp = file+3; isdigit(*cp); )
+ for (n = 0, cp = file+3; isdigit((unsigned char)*cp); )
n = n * 10 + (*cp++ - '0');
for (r = requ; r < &requ[requests]; r++)
if (*r == n && !strcmp(cp, from))
diff --git a/usr.sbin/lpr/common_source/rmjob.c b/usr.sbin/lpr/common_source/rmjob.c
index 54d9f8a5333..f481a7aabf0 100644
--- a/usr.sbin/lpr/common_source/rmjob.c
+++ b/usr.sbin/lpr/common_source/rmjob.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: rmjob.c,v 1.20 2012/11/29 02:15:44 guenther Exp $ */
+/* $OpenBSD: rmjob.c,v 1.21 2013/11/24 21:32:32 deraadt Exp $ */
/* $NetBSD: rmjob.c,v 1.16 2000/04/16 14:43:58 mrg Exp $ */
/*
@@ -279,7 +279,7 @@ chk(char *file)
/*
* Check the request list
*/
- for (n = 0, cp = file+3; isdigit(*cp); )
+ for (n = 0, cp = file+3; isdigit((unsigned char)*cp); )
n = n * 10 + (*cp++ - '0');
for (r = requ; r < &requ[requests]; r++)
if (*r == n && isowner(line+1, file))
diff --git a/usr.sbin/lpr/lpc/cmds.c b/usr.sbin/lpr/lpc/cmds.c
index 7fe784578c9..3b4a59b8e33 100644
--- a/usr.sbin/lpr/lpc/cmds.c
+++ b/usr.sbin/lpr/lpc/cmds.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: cmds.c,v 1.24 2012/11/29 02:15:44 guenther Exp $ */
+/* $OpenBSD: cmds.c,v 1.25 2013/11/24 21:32:32 deraadt Exp $ */
/* $NetBSD: cmds.c,v 1.12 1997/10/05 15:12:06 mrg Exp $ */
/*
@@ -1061,14 +1061,14 @@ doarg(char *job)
/*
* Check for job specified by number (example: 112 or 235ucbarpa).
*/
- if (isdigit(*job)) {
+ if (isdigit((unsigned char)*job)) {
jobnum = 0;
do
jobnum = jobnum * 10 + (*job++ - '0');
- while (isdigit(*job));
+ while (isdigit((unsigned char)*job));
for (qq = queue + nitems; --qq >= queue; ) {
n = 0;
- for (cp = (*qq)->q_name+3; isdigit(*cp); )
+ for (cp = (*qq)->q_name+3; isdigit((unsigned char)*cp); )
n = n * 10 + (*cp++ - '0');
if (jobnum != n)
continue;
diff --git a/usr.sbin/lpr/lpd/lpd.c b/usr.sbin/lpr/lpd/lpd.c
index 076bc806e84..79848795a47 100644
--- a/usr.sbin/lpr/lpd/lpd.c
+++ b/usr.sbin/lpr/lpd/lpd.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: lpd.c,v 1.51 2013/03/11 17:40:11 deraadt Exp $ */
+/* $OpenBSD: lpd.c,v 1.52 2013/11/24 21:32:32 deraadt Exp $ */
/* $NetBSD: lpd.c,v 1.33 2002/01/21 14:42:29 wiz Exp $ */
/*
@@ -528,11 +528,11 @@ doit(void)
continue;
}
*cp++ = '\0';
- while (isspace(*cp))
+ while (isspace((unsigned char)*cp))
cp++;
if (*cp == '\0')
break;
- if (isdigit(*cp)) {
+ if (isdigit((unsigned char)*cp)) {
if (requests >= MAXREQUESTS)
fatal("Too many requests");
requ[requests++] = atoi(cp);
@@ -564,11 +564,11 @@ doit(void)
continue;
}
*cp++ = '\0';
- while (isspace(*cp))
+ while (isspace((unsigned char)*cp))
cp++;
if (*cp == '\0')
break;
- if (isdigit(*cp)) {
+ if (isdigit((unsigned char)*cp)) {
if (requests >= MAXREQUESTS)
fatal("Too many requests");
requ[requests++] = atoi(cp);
diff --git a/usr.sbin/lpr/lpd/printjob.c b/usr.sbin/lpr/lpd/printjob.c
index 04f36895ee5..d3cb8dc4782 100644
--- a/usr.sbin/lpr/lpd/printjob.c
+++ b/usr.sbin/lpr/lpd/printjob.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: printjob.c,v 1.47 2012/03/04 04:05:15 fgsch Exp $ */
+/* $OpenBSD: printjob.c,v 1.48 2013/11/24 21:32:32 deraadt Exp $ */
/* $NetBSD: printjob.c,v 1.31 2002/01/21 14:42:30 wiz Exp $ */
/*
@@ -1093,7 +1093,7 @@ sendmail(char *user, int bombed)
struct stat stb;
FILE *fp;
- if (user[0] == '-' || user[0] == '/' || !isprint(user[0]))
+ if (user[0] == '-' || user[0] == '/' || !isprint((unsigned char)user[0]))
return;
pipe(p);
if ((s = dofork(DORETURN)) == 0) { /* child */
diff --git a/usr.sbin/lpr/lpq/lpq.c b/usr.sbin/lpr/lpq/lpq.c
index 5db0762eef4..934ec081ef1 100644
--- a/usr.sbin/lpr/lpq/lpq.c
+++ b/usr.sbin/lpr/lpq/lpq.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: lpq.c,v 1.19 2009/10/27 23:59:52 deraadt Exp $ */
+/* $OpenBSD: lpq.c,v 1.20 2013/11/24 21:32:32 deraadt Exp $ */
/* $NetBSD: lpq.c,v 1.9 1999/12/07 14:54:47 mrg Exp $ */
/*
@@ -114,7 +114,7 @@ main(int argc, char **argv)
printer = DEFLP;
for (argc -= optind, argv += optind; argc; --argc, ++argv)
- if (isdigit(argv[0][0])) {
+ if (isdigit((unsigned char)argv[0][0])) {
if (requests >= MAXREQUESTS)
fatal("too many requests");
requ[requests++] = atoi(*argv);
diff --git a/usr.sbin/lpr/lpr/lpr.c b/usr.sbin/lpr/lpr/lpr.c
index d8f31192fe2..182831cca2b 100644
--- a/usr.sbin/lpr/lpr/lpr.c
+++ b/usr.sbin/lpr/lpr/lpr.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: lpr.c,v 1.44 2013/08/08 03:16:14 guenther Exp $ */
+/* $OpenBSD: lpr.c,v 1.45 2013/11/24 21:32:32 deraadt Exp $ */
/* $NetBSD: lpr.c,v 1.19 2000/10/11 20:23:52 is Exp $ */
/*
@@ -145,7 +145,7 @@ main(int argc, char **argv)
switch (ch) {
case '#': /* n copies */
- if (isdigit(*optarg)) {
+ if (isdigit((unsigned char)*optarg)) {
i = atoi(optarg);
if (i > 0)
ncopies = i;
diff --git a/usr.sbin/lpr/lprm/lprm.c b/usr.sbin/lpr/lprm/lprm.c
index 0087be7c1f0..80bf8f4b310 100644
--- a/usr.sbin/lpr/lprm/lprm.c
+++ b/usr.sbin/lpr/lprm/lprm.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: lprm.c,v 1.18 2009/10/27 23:59:52 deraadt Exp $ */
+/* $OpenBSD: lprm.c,v 1.19 2013/11/24 21:32:32 deraadt Exp $ */
/* $$NetBSD: lprm.c,v 1.9 1999/08/16 03:12:32 simonb Exp $ */
/*
@@ -131,7 +131,7 @@ main(int argc, char **argv)
if (users < 0 && argc != 0)
usage();
while (argc > 0) {
- if (isdigit(*argv[0])) {
+ if (isdigit((unsigned char)*argv[0])) {
if (requests >= MAXREQUESTS)
fatal("Too many requests");
requ[requests++] = atoi(argv[0]);
diff --git a/usr.sbin/lpr/pac/pac.c b/usr.sbin/lpr/pac/pac.c
index f1f2fffe3e1..4235aad0d8e 100644
--- a/usr.sbin/lpr/pac/pac.c
+++ b/usr.sbin/lpr/pac/pac.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: pac.c,v 1.19 2009/10/27 23:59:52 deraadt Exp $ */
+/* $OpenBSD: pac.c,v 1.20 2013/11/24 21:32:32 deraadt Exp $ */
/* $NetBSD: pac.c,v 1.14 2000/04/27 13:40:18 msaitoh Exp $ */
/*
@@ -215,17 +215,17 @@ account(FILE *acct)
while (fgets(linebuf, sizeof(linebuf), acct) != NULL) {
cp = linebuf;
- while (isspace(*cp))
+ while (isspace((unsigned char)*cp))
cp++;
/* get t, feet_per_page */
errno = 0;
t = strtod(cp, &ep);
- if (!isspace(*ep) || errno == ERANGE)
+ if (!isspace((unsigned char)*ep) || errno == ERANGE)
continue;
/* get ic, runs_count (optional) */
- for (cp = ep + 1; isspace(*cp); )
+ for (cp = ep + 1; isspace((unsigned char)*cp); )
cp++;
l = strtol(cp, &ep, 10);
if (cp == ep)
@@ -235,9 +235,9 @@ account(FILE *acct)
ic = (int)l;
/* get [hostname:]username */
- for (cp = ep; isspace(*cp); cp++)
+ for (cp = ep; isspace((unsigned char)*cp); cp++)
;
- for (cp2 = cp; *cp2 && !isspace(*cp2); cp2++)
+ for (cp2 = cp; *cp2 && !isspace((unsigned char)*cp2); cp2++)
;
*cp2 = '\0';
/* if -m was specified, don't use the hostname part */