Messages in this thread Patches in this message | | | Date | Tue, 7 Jun 2005 01:20:31 +0200 | From | Jesper Juhl <> | Subject | [PATCH] remove meaningless <0 comparison in binfmt_elf |
| |
'i' is clearly defined at the start of the function to be unsigned, so comparing it to be less than zero is meaningless. This patch removes the meaningless comparison.
Since I'm away from home I can't use my usual pine to send the email, but have to use gmail, and I don't know how gmail will treat the inline patch, so I'm also attaching it.
Signed-off-by: Jesper Juhl <jesper.juhl@gmail.com> ---
fs/binfmt_elf.c | 2 +- 1 files changed, 1 insertion(+), 1 deletion(-)
--- linux-2.6.12-rc6-orig/fs/binfmt_elf.c 2005-06-07 00:07:40.000000000 +0200 +++ linux-2.6.12-rc6/fs/binfmt_elf.c 2005-06-07 01:12:37.000000000 +0200 @@ -1324,7 +1324,7 @@ static int fill_psinfo(struct elf_prpsin 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;
-- Jesper Juhl <jesper.juhl@gmail.com> Don't top-post http://www.catb.org/~esr/jargon/html/T/top-post.html Plain text mails only, please http://www.expita.com/nomime.html --- linux-2.6.12-rc6-orig/fs/binfmt_elf.c 2005-06-07 00:07:40.000000000 +0200 +++ linux-2.6.12-rc6/fs/binfmt_elf.c 2005-06-07 01:12:37.000000000 +0200 @@ -1324,7 +1324,7 @@ static int fill_psinfo(struct elf_prpsin 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; | |