public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] Remove pointless <0 comparison for unsigned variable in fs/fcntl.c
@ 2004-11-21 22:55 Jesper Juhl
  2004-11-22  1:02 ` Matthew Wilcox
  0 siblings, 1 reply; 17+ messages in thread
From: Jesper Juhl @ 2004-11-21 22:55 UTC (permalink / raw)
  To: Matthew Wilcox; +Cc: linux-fsdevel, linux-kernel


Hi,

This patch removes a pointless comparison. "arg" is an unsigned long, thus 
it can never be <0, so testing that is pointless.

Signed-off-by: Jesper Juhl <juhl-lkml@dif.dk>

diff -up linux-2.6.10-rc2-bk6-orig/fs/fcntl.c linux-2.6.10-rc2-bk6/fs/fcntl.c
--- linux-2.6.10-rc2-bk6-orig/fs/fcntl.c	2004-11-17 01:20:14.000000000 +0100
+++ linux-2.6.10-rc2-bk6/fs/fcntl.c	2004-11-21 23:49:20.000000000 +0100
@@ -340,7 +340,7 @@ static long do_fcntl(int fd, unsigned in
 		break;
 	case F_SETSIG:
 		/* arg == 0 restores default behaviour. */
-		if (arg < 0 || arg > _NSIG) {
+		if (arg > _NSIG) {
 			break;
 		}
 		err = 0;



^ permalink raw reply	[flat|nested] 17+ messages in thread

end of thread, other threads:[~2004-11-27  6:31 UTC | newest]

Thread overview: 17+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-11-21 22:55 [PATCH] Remove pointless <0 comparison for unsigned variable in fs/fcntl.c Jesper Juhl
2004-11-22  1:02 ` Matthew Wilcox
2004-11-23  9:42   ` Jesper Juhl
2004-11-23 10:42     ` Jamie Lokier
2004-11-23 18:28       ` Bryan Henderson
2004-11-23 18:03     ` Linus Torvalds
2004-11-23 18:39       ` Jesper Juhl
2004-11-23 18:37         ` Linus Torvalds
2004-11-23 19:20           ` linux-os
2004-11-23 23:16           ` Jesper Juhl
2004-11-23 19:13       ` Timur Tabi
2004-11-23 23:09         ` Jesper Juhl
2004-11-23 23:03           ` Timur Tabi
2004-11-23 23:19             ` Jesper Juhl
2004-11-23 23:09               ` Timur Tabi
2004-11-23 23:28                 ` Jesper Juhl
2004-11-25 22:34             ` Valdis.Kletnieks

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox