[PATCH] fs/fcntl.c : don't test unsigned value for less than zero

From: Jesper Juhl
Date: Thu Apr 14 2005 - 20:06:43 EST


'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@xxxxxx>

--- 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;

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/