Use MIN() macro from sys/param.h.
MFC after: 2 weeks.
This commit is contained in:
parent
7de7df1554
commit
a301044615
@ -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);
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user