summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarcelo Araujo <araujo@FreeBSD.org>2016-05-02 01:45:52 +0000
committerMarcelo Araujo <araujo@FreeBSD.org>2016-05-02 01:45:52 +0000
commiteff97b5e6309150951ef672e2345b470d927b084 (patch)
tree732079e1c6e40f44b5d374f32925fdc01fcb6228
parenta1b422f4d65dbbc0ab363bd71914204461dbd8bc (diff)
Notes
-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 5b5ec7884ab7..2be4c84d619a 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);