lkml.org 
[lkml]   [2000]   [Jan]   [17]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRecent 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/

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