From 41e7510333e8c4308668ec10d7726ba517a153ee Mon Sep 17 00:00:00 2001 From: Jim Warner Date: Thu, 8 Oct 2015 00:00:00 -0500 Subject: [PATCH] top: correct a flaw in the support for pids monitoring Ever since top was adapted to the new interface there has been a bug that would cause an abnormal exit when the '-p' argument contained *no* valid pids. This was never revealed until now since the QA folks tested only with valid, existing pids. (bunch of morons, eh?) And even though the program author is blameless he has taken it upon himself to clean up after the QA jokers. 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 e1537f0a..253b7961 100644 --- a/top/top.c +++ b/top/top.c @@ -2248,7 +2248,7 @@ static void procs_refresh (void) { #define nALGN2(n,m) ((n + m - 1) & ~(m - 1)) // with power of 2 align #define n_reap Pids_reap->counts.total // maintained by newlib static double uptime_sav; - static int n_alloc; // size of windows stacks arrays + static int n_alloc = -1; // size of windows stacks arrays double uptime_cur; float et; int i;