Messages in this thread | | | Date | Mon, 17 Jan 2000 17:49:43 +0100 | From | Jamie Lokier <> | Subject | Recent change in tcp_output.c is surely wrong |
| |
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/
| |