Re: Recent change in tcp_output.c is surely wrong

From: Jamie Lokier (lkd@tantalophile.demon.co.uk)
Date: Tue Jan 18 2000 - 13:46:07 EST


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/



This archive was generated by hypermail 2b29 : Sun Jan 23 2000 - 21:00:18 EST