[lkml]   [2004]   [Nov]   [27]   [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
On Tue, 23 Nov 2004 17:03:10 CST, Timur Tabi said:
> Jesper Juhl wrote:
> > if pid_t is 16 bit, then the value can never be greater than 0xffff but,
> > if pid_t is greater than 16 bit, say 32 bit, then the argument "a" could
> > very well contain a value greater than 0xffff and then the comparison
> > makes perfect sense.
> If pid_t is 32-bit, then what's wrong with the value being greater than
> 0xFFFF? After all, if pid_t a 32-bit number, that implies that 32-bit
> values are acceptable.

Try setting max_pid to 256K or so on an i386 - although the result fits
nicely in a pid_t with plenty of bits to spare, Very Bad Things happen.

Long thread starting at
[unhandled content-type:application/pgp-signature]
 \ /
  Last update: 2005-03-22 14:08    [W:0.069 / U:1.084 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site