Re: [PATCH] Remove pointless <0 comparison for unsigned variable in fs/fcntl.c

From: Bryan Henderson
Date: Tue Nov 23 2004 - 13:36:10 EST


>The unusual thing about this function is that "arg" is really
>polymorphic, but given type "unsigned long" in the kernel. It is
>really a way to hold arbitrary values of any type.

As you've described it, what's wrong with this code is not that it tests
arg < 0, but that it should cast arg to int before doing so:

int signal_arg = (int) arg;
if (signal_arg < 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/