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

Bryan Henderson
2004-11-23T18:32:00Z

>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) ...