From 80ce790881f1d78f3fbbac8515b95cf0551bbc45 Mon Sep 17 00:00:00 2001 From: Gregory Burd Date: Sat, 29 Sep 2012 13:30:46 -0400 Subject: [PATCH] comparison of unsigned enum expression >= 0 is always true --- proc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/proc.c b/proc.c index 0c7f119..3ee2f0a 100644 --- a/proc.c +++ b/proc.c @@ -442,7 +442,7 @@ procdump(void) for(p = ptable.proc; p < &ptable.proc[NPROC]; p++){ if(p->state == UNUSED) continue; - if(p->state >= 0 && p->state < NELEM(states) && states[p->state]) + if(p->state && p->state < NELEM(states) && states[p->state]) state = states[p->state]; else state = "???";