Author: araujo
Date: Mon May  2 01:45:52 2016
New Revision: 298910
URL: https://svnweb.freebsd.org/changeset/base/298910

Log:
  Use MIN macro from sys/param.h.
  
  MFC after:    2 weeks.

Modified:
  head/usr.sbin/lpr/lpc/lpc.c

Modified: head/usr.sbin/lpr/lpc/lpc.c
==============================================================================
--- head/usr.sbin/lpr/lpc/lpc.c Mon May  2 01:43:22 2016        (r298909)
+++ head/usr.sbin/lpr/lpc/lpc.c Mon May  2 01:45:52 2016        (r298910)
@@ -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);
_______________________________________________
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"

Reply via email to