From: Jim Warner Date: Wed, 21 Jul 2021 05:00:00 +0000 (-0500) Subject: top: whack a label & branch in 'summary_show' function X-Git-Tag: v4.0.0~166 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=1c1dd028625ed897b86f57043a7758870da702a9;p=procps-ng top: whack a label & branch in 'summary_show' function If there are zero numa nodes then the View_CPUNOD flag cannot possibly be set. So it was unnecessary to check both the numa total and View_CPUNOD in 'summary_show'. Signed-off-by: Jim Warner --- diff --git a/top/top.c b/top/top.c index c69db6b5..68fb23af 100644 --- a/top/top.c +++ b/top/top.c @@ -5574,7 +5574,6 @@ static void summary_show (void) { cpus_refresh(); - if (!Numa_node_tot) goto numa_nope; if (CHKw(w, View_CPUNOD)) { if (Numa_node_sel < 0) { numa_oops: @@ -5612,12 +5611,11 @@ numa_oops: } } } - } else -numa_nope: - if (CHKw(w, View_CPUSUM)) { + } else if (CHKw(w, View_CPUSUM)) { // display just the 1st /proc/stat line Msg_row += cpu_tics(Stat_reap->summary, N_txt(WORD_allcpus_txt), 1); + } else { // display each cpu's states separately, screen height permitting... #ifdef PRETEND48CPU