lkml.org 
[lkml]   [2004]   [Nov]   [23]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH] Remove pointless <0 comparison for unsigned variable in fs/fcntl.c
From
Date
>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@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-03-22 14:08    [from the cache]
©2003-2011 Jasper Spaans