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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



'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 <[email protected]>

--- 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 [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[Index of Archives]     [Kernel Newbies]     [Netfilter]     [Bugtraq]     [Photo]     [Stuff]     [Gimp]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Video 4 Linux]     [Linux for the blind]     [Linux Resources]
  Powered by Linux