From 95f22017309f0025c724258335cf586b1d939e68 Mon Sep 17 00:00:00 2001 From: James Cloos Date: Mon, 6 Feb 2012 00:00:00 -0500 Subject: [PATCH] top: postpone the switch from Kb to Mb in summary display The mem and swap lines have enough room to show eight significant digits, so switch to showing MB when >=100MB, not >=10MB. The extra detail is valuable; it should not be elided. Signed-off-by: James Cloos Signed-off-by: Jim Warner --- top/top.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/top/top.c b/top/top.c index d0b40acc..0baa0274 100644 --- a/top/top.c +++ b/top/top.c @@ -3417,7 +3417,7 @@ static void summary_show (void) { int shift = 0; /*** hotplug_acclimated ***/ - if (kb_main_total > 9999999) + if (kb_main_total > 99999999) { which = N_txt(AMT_megabyte_txt); shift = 10; } if (kb_main_total > 9999999999ull) { which = N_txt(AMT_gigabyte_txt); shift = 20; } -- 2.40.0