lkml.org 
[lkml]   [2000]   [Jan]   [19]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: Recent change in tcp_output.c is surely wrong
Horst von Brand wrote:
> > and `&= (1U<<31)' is more obvious. Using a symbolic constant would be even
> > better.
>
> The original would really be '&= (~0U >> 1)' (not all ints are 32 bits...)

In the original example, tp->ato is exactly 32 bits wide regardless of
the width of an int, so `&= ~(1UL << 31)' is correct. I say `1UL' and
not `1U' because the latter may be less then 32 bits wide.

-- Jamie

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-03-22 13:56    [W:0.069 / U:0.112 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site