[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [lwip-users] Strange "always true" conditional in tcp_in.c
From: |
Simon Goldschmidt |
Subject: |
Re: [lwip-users] Strange "always true" conditional in tcp_in.c |
Date: |
Mon, 01 Mar 2010 10:05:46 +0100 |
Lou Cypher wrote:
> The case above isn't always true, in fact it yields false when
> pcb->dupacks == 0xFF.
> May be that was the intended behavior? Then could have been shorter (and
> more
> intuitive) checking for
> if( pcb->dupacks != 0xFF )
The original check intends to be still valid if the type of 'dupacks' is
changed in the future, therefore, I think it is better than explicitly checking
for a constant (0xFF). This kind of check is used in multiple places throughout
the stack and should have a comment stating that this is an overflow check.
I didn't check yet if the bug report here is valid, but at least under
VS2005/2008 and cygwin-gcc, there is no such warning...
Simon
--
Sicherer, schneller und einfacher. Die aktuellen Internet-Browser -
jetzt kostenlos herunterladen! http://portal.gmx.net/de/go/atbrowser
- Re: [lwip-users] Strange "always true" conditional in tcp_in.c, Lou Cypher, 2010/03/01
- Re: [lwip-users] Strange "always true" conditional in tcp_in.c,
Simon Goldschmidt <=
- Re: [lwip-users] Strange "always true" conditional in tcp_in.c, Kieran Mansley, 2010/03/01
- Re: [lwip-users] Strange "always true" conditional in tcp_in.c, Mike Kleshov, 2010/03/01
- RE: [lwip-users] Strange "always true" conditional in tcp_in.c, Bill Auerbach, 2010/03/01
- RE: [lwip-users] Strange "always true" conditional in tcp_in.c, Bill Auerbach, 2010/03/01
- RE: [lwip-users] Strange "always true" conditional in tcp_in.c, Bill Auerbach, 2010/03/01
- RE: [lwip-users] Strange "always true" conditional in tcp_in.c, Bill Auerbach, 2010/03/01
- RE: [lwip-users] Strange "always true" conditional in tcp_in.c, Kieran Mansley, 2010/03/01
- RE: [lwip-users] Strange "always true" conditional in tcp_in.c, Bill Auerbach, 2010/03/01
RE: [lwip-users] Strange "always true" conditional in tcp_in.c, Bill Yang, 2010/03/01
Re: [lwip-users] Strange "always true" conditional in tcp_in.c, Lou Cypher, 2010/03/02