svn commit: r298685 - head/usr.bin/tftp

Marcelo Araujo araujo at FreeBSD.org
Wed Apr 27 02:34:26 UTC 2016


Author: araujo
Date: Wed Apr 27 02:34:25 2016
New Revision: 298685
URL: https://svnweb.freebsd.org/changeset/base/298685

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

Modified:
  head/usr.bin/tftp/main.c

Modified: head/usr.bin/tftp/main.c
==============================================================================
--- head/usr.bin/tftp/main.c	Wed Apr 27 02:26:31 2016	(r298684)
+++ head/usr.bin/tftp/main.c	Wed Apr 27 02:34:25 2016	(r298685)
@@ -727,7 +727,7 @@ command(void)
 		if (vrbose) {
                         if ((bp = el_gets(el, &num)) == NULL || num == 0)
                                 exit(0);
-                        len = (num > MAXLINE) ? MAXLINE : num;
+                        len = MIN(MAXLINE, num);
                         memcpy(line, bp, len);
                         line[len] = '\0';
                         history(hist, &he, H_ENTER, bp);


More information about the svn-src-head mailing list