Recent change in tcp_output.c is surely wrong

From: Jamie Lokier (lkd@tantalophile.demon.co.uk)
Date: Mon Jan 17 2000 - 11:49:43 EST


I noticed this in pre-patch-2.3.40-4.gz:

 
        /* Stay within the limit we were given */
- timeout = tp->ato;
+ timeout = (tp->ato << 1) >> 1;
        if (timeout > max_timeout)
                timeout = max_timeout;

What is the point of this?

   - If tp->ato has bit 31 set, then the effect depends on the width of `int'.
     (Because all arithmetic operations in C extend to `int' width first).

   - If tp->ato is bit 31 clear, this has no effect.

If the intention is to clear bit 31, `&= 0x7fffffff' is the thing which
works and is probably more efficient.

Enjoy,
-- 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:16 EST