Use MIN() macro from sys/param.h.

MFC after:	2 weeks.
This commit is contained in:
Marcelo Araujo 2016-04-27 02:13:57 +00:00
parent 7de7df1554
commit a301044615
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=298682

View File

@ -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);
}