Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 27 Apr 2016 02:13:57 +0000 (UTC)
From:      Marcelo Araujo <araujo@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r298682 - head/usr.bin/quota
Message-ID:  <201604270213.u3R2DvH8042406@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
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);
 }



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201604270213.u3R2DvH8042406>