Subject: Re: 32/64 sign-extension bug in TCP
To: Chuck Silvers <chuq@chuq.com>
From: None <ragge@ludd.luth.se>
List: tech-net
Date: 05/03/2004 16:05:09
>
> the attached diff fixes this for me, by using replacing "long" with "int"
> in tcp_output.c and removing several casts that become unnecessary.
> does anyone see any problem with this change? post 2.0, it would be good
> to eliminate "long" from the rest of the TCP code, but I'd rather stick
> with a smaller change for now.
>
Wouldn't it be better to replace it with int32_t instead? Not that I
think any 16-bit machines uses our IP stack and therefore would fail
if changed long->int, but it would not hurt to use a fixed-size type.
-- Ragge