svn commit: r298682 - head/usr.bin/quota

Marcelo Araujo araujo at FreeBSD.org
Wed Apr 27 02:13:58 UTC 2016


Author: araujo
Date: Wed Apr 27 02:13:57 2016
New Revision: 298682
URL: https://svnweb.freebsd.org/changeset/base/298682

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

Modified:
  head/usr.bin/quota/quota.c

Modified: head/usr.bin/quota/quota.c
==============================================================================
--- head/usr.bin/quota/quota.c	Wed Apr 27 02:02:44 2016	(r298681)
+++ head/usr.bin/quota/quota.c	Wed Apr 27 02:13:57 2016	(r298682)
@@ -266,8 +266,8 @@ prthumanval(int len, u_int64_t bytes)
 	/*
 	 * Limit the width to 5 bytes as that is what users expect.
 	 */
-	humanize_number(buf, sizeof(buf) < 5 ? sizeof(buf) : 5, bytes, "",
-	    HN_AUTOSCALE, HN_B | HN_NOSPACE | HN_DECIMAL);
+	humanize_number(buf, MIN(sizeof(buf), 5), bytes, "",
+			HN_AUTOSCALE, HN_B | HN_NOSPACE | HN_DECIMAL);
 
 	(void)printf(" %*s", len, buf);
 }


More information about the svn-src-head mailing list