summaryrefslogtreecommitdiffstats
path: root/usr.sbin/lpd
diff options
context:
space:
mode:
authorbenno <benno@openbsd.org>2020-03-16 20:46:44 +0000
committerbenno <benno@openbsd.org>2020-03-16 20:46:44 +0000
commit895f7d11145b8b99b0ffed6e1b8fe918c450228b (patch)
tree2007c035f34caf8503919dd245361b06125067fd /usr.sbin/lpd
parentDo not attempt to close a NULL pane when failing to create a new one. (diff)
downloadwireguard-openbsd-895f7d11145b8b99b0ffed6e1b8fe918c450228b.tar.xz
wireguard-openbsd-895f7d11145b8b99b0ffed6e1b8fe918c450228b.zip
fix cast in isdigit() calls.
ok eric@ deraadt@
Diffstat (limited to 'usr.sbin/lpd')
-rw-r--r--usr.sbin/lpd/frontend_lpr.c4
-rw-r--r--usr.sbin/lpd/lp.c8
2 files changed, 6 insertions, 6 deletions
diff --git a/usr.sbin/lpd/frontend_lpr.c b/usr.sbin/lpd/frontend_lpr.c
index 778343e6cae..edcfe1b0a99 100644
--- a/usr.sbin/lpd/frontend_lpr.c
+++ b/usr.sbin/lpd/frontend_lpr.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: frontend_lpr.c,v 1.2 2019/04/04 19:25:45 eric Exp $ */
+/* $OpenBSD: frontend_lpr.c,v 1.3 2020/03/16 20:46:44 benno Exp $ */
/*
* Copyright (c) 2017 Eric Faurot <eric@openbsd.org>
@@ -581,7 +581,7 @@ lpr_parsejobfilter(struct lpr_conn *conn, struct lp_jobfilter *jf, int argc,
for (i = 0; i < argc; i++) {
arg = argv[i];
- if (isdigit((unsigned int)arg[0])) {
+ if (isdigit((unsigned char)arg[0])) {
if (jf->njob == LP_MAXREQUESTS) {
lpr_reply(conn, "Too many requests");
return -1;
diff --git a/usr.sbin/lpd/lp.c b/usr.sbin/lpd/lp.c
index adcfb32d0c9..cb2ba8d6326 100644
--- a/usr.sbin/lpd/lp.c
+++ b/usr.sbin/lpd/lp.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: lp.c,v 1.2 2019/11/08 07:26:38 mestre Exp $ */
+/* $OpenBSD: lp.c,v 1.3 2020/03/16 20:46:44 benno Exp $ */
/*
* Copyright (c) 2017 Eric Faurot <eric@openbsd.org>
@@ -321,9 +321,9 @@ lp_readqueue(struct lp_printer *lp, struct lp_queue *q)
if (strlen(d->d_name) < 7)
continue;
- if (!isdigit((unsigned int)d->d_name[3]) ||
- !isdigit((unsigned int)d->d_name[4]) ||
- !isdigit((unsigned int)d->d_name[5]))
+ if (!isdigit((unsigned char)d->d_name[3]) ||
+ !isdigit((unsigned char)d->d_name[4]) ||
+ !isdigit((unsigned char)d->d_name[5]))
continue;
if (strlcpy(end, d->d_name, sz) >= sz) {