mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH] fs/fcntl.c : don't test unsigned value for less than zero
@ 2005-04-15  1:07 Jesper Juhl
  2005-04-15  1:31 ` Matthew Wilcox
  0 siblings, 1 reply; 9+ messages in thread
From: Jesper Juhl @ 2005-04-15  1:07 UTC (permalink / raw)
  To: Matthew Wilcox; +Cc: linux-fsdevel, linux-kernel

'arg' is unsigned so it can never be less than zero, so testing for that 
is pointless and also generates a warning when building with gcc -W. This 
patch eliminates the pointless check.

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

--- linux-2.6.12-rc2-mm3-orig/fs/fcntl.c	2005-04-11 21:20:50.000000000 +0200
+++ linux-2.6.12-rc2-mm3/fs/fcntl.c	2005-04-15 03:03:00.000000000 +0200
@@ -308,7 +308,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] 9+ messages in thread

end of thread, other threads:[~2005-04-17 20:57 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2005-04-15  1:07 [PATCH] fs/fcntl.c : don't test unsigned value for less than zero Jesper Juhl
2005-04-15  1:31 ` Matthew Wilcox
2005-04-15  8:21   ` Christoph Hellwig
2005-04-15 11:29     ` Matthew Wilcox
2005-04-15 11:32       ` Christoph Hellwig
2005-04-15 12:03         ` Herbert Xu
2005-04-15 13:21           ` Matthew Wilcox
2005-04-17 21:00             ` Jesper Juhl
2005-04-15  8:23   ` Jesper Juhl

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

all inboxes | Powered by JetHome®