From 197079be042259eae1aa6b89b8d41125180bd53d Mon Sep 17 00:00:00 2001 From: araujo Date: Mon, 2 May 2016 01:45:52 +0000 Subject: Use MIN macro from sys/param.h. MFC after: 2 weeks. --- usr.sbin/lpr/lpc/lpc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'usr.sbin/lpr/lpc') 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); -- cgit v1.1