summaryrefslogtreecommitdiffstats
path: root/usr.sbin/lpr/lpc/lpc.c
diff options
context:
space:
mode:
Diffstat (limited to 'usr.sbin/lpr/lpc/lpc.c')
-rw-r--r--usr.sbin/lpr/lpc/lpc.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/usr.sbin/lpr/lpc/lpc.c b/usr.sbin/lpr/lpc/lpc.c
index 5b5ec78..2be4c84 100644
--- a/usr.sbin/lpr/lpc/lpc.c
+++ b/usr.sbin/lpr/lpc/lpc.c
@@ -182,7 +182,7 @@ cmdscanner(void)
if ((bp = el_gets(el, &num)) == NULL || num == 0)
quit(0, NULL);
- len = (num > MAX_CMDLINE - 1) ? MAX_CMDLINE - 1 : num;
+ len = MIN(MAX_CMDLINE - 1, num);
memcpy(cmdline, bp, len);
cmdline[len] = 0;
history(hist, &he, H_ENTER, bp);
OpenPOWER on IntegriCloud