summaryrefslogtreecommitdiff
path: root/usr.sbin/lpd/frontend_lpr.c
diff options
context:
space:
mode:
authorEric Faurot <eric@cvs.openbsd.org>2019-04-04 19:25:47 +0000
committerEric Faurot <eric@cvs.openbsd.org>2019-04-04 19:25:47 +0000
commit02b65352b543147bbe58975d6f114396ef6ce3e8 (patch)
tree1c7393065d509706e9e0453f580a0b1909ae755e /usr.sbin/lpd/frontend_lpr.c
parent8f470710054cb563a6bd29ee2bc846a7806b981a (diff)
accept the NULL string in the proc message formatting api and simplify
code accordingly.
Diffstat (limited to 'usr.sbin/lpd/frontend_lpr.c')
-rw-r--r--usr.sbin/lpd/frontend_lpr.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/usr.sbin/lpd/frontend_lpr.c b/usr.sbin/lpd/frontend_lpr.c
index ad9c94f92af..778343e6cae 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.1 2018/04/27 16:14:35 eric Exp $ */
+/* $OpenBSD: frontend_lpr.c,v 1.2 2019/04/04 19:25:45 eric Exp $ */
/*
* Copyright (c) 2017 Eric Faurot <eric@openbsd.org>
@@ -159,7 +159,7 @@ lpr_dispatch_engine(struct imsgproc *proc, struct imsg *imsg)
m_get_string(proc, &hostname);
m_get_string(proc, &reject);
m_end(proc);
- lpr_on_allowedhost(conn, hostname, reject[0] ? reject : NULL);
+ lpr_on_allowedhost(conn, hostname, reject);
break;
case IMSG_LPR_RECVJOB:
@@ -182,8 +182,7 @@ lpr_dispatch_engine(struct imsgproc *proc, struct imsg *imsg)
m_get_string(proc, &hostname);
m_get_string(proc, &cmd);
m_end(proc);
- lpr_on_request(conn, imsg->fd, hostname[0] ? hostname : NULL,
- cmd[0] ? cmd : NULL);
+ lpr_on_request(conn, imsg->fd, hostname, cmd);
break;
default: