comparison of unsigned enum expression >= 0 is always true
This commit is contained in:
parent
8ae9d2f294
commit
80ce790881
1 changed files with 1 additions and 1 deletions
2
proc.c
2
proc.c
|
@ -442,7 +442,7 @@ procdump(void)
|
||||||
for(p = ptable.proc; p < &ptable.proc[NPROC]; p++){
|
for(p = ptable.proc; p < &ptable.proc[NPROC]; p++){
|
||||||
if(p->state == UNUSED)
|
if(p->state == UNUSED)
|
||||||
continue;
|
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];
|
state = states[p->state];
|
||||||
else
|
else
|
||||||
state = "???";
|
state = "???";
|
||||||
|
|
Loading…
Reference in a new issue