Skip to contentSkip to conversation

remove needless check in binfmt_elf.c

PATCH New Carsten Otte 1 participant 1 message Mar 21, 2006

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 remove needless check in binfmt_elf.c

local variable i is unsigned int and thus cannot be negative.

--

fs/binfmt_elf.c +1 -1
diff -ruN linux-2.6.16/fs/binfmt_elf.c linux-2.6.16-fix/fs/binfmt_elf.c
@@ -1334,7 +1334,7 @@
 
 	i = p->state ? ffz(~p->state) + 1 : 0;
 	psinfo->pr_state = i;
-	psinfo->pr_sname = (i < 0 || i > 5) ? '.' : "RSDTZW"[i];
+	psinfo->pr_sname = (i > 5) ? '.' : "RSDTZW"[i];
 	psinfo->pr_zomb = psinfo->pr_sname == 'Z';
 	psinfo->pr_nice = task_nice(p);
 	psinfo->pr_flag = p->flags;