diff --git a/usr.bin/vmstat/vmstat.c b/usr.bin/vmstat/vmstat.c index 03f4f964ebc0..0dbd2d165dda 100644 --- a/usr.bin/vmstat/vmstat.c +++ b/usr.bin/vmstat/vmstat.c @@ -884,7 +884,7 @@ printhdr(int maxid, u_long cpumask) { int i, num_shown; - num_shown = (num_selected < maxshowdevs) ? num_selected : maxshowdevs; + num_shown = MIN(num_selected, maxshowdevs); if (hflag) { xo_emit("{T:procs} {T:memory} {T:/page%*s}", 19, ""); } else {