Wireshark-dev: Re: [Wireshark-dev] Lint of packet-tcp.c
From: didier <dgautheron@xxxxxxxx>
Date: Fri, 15 Aug 2008 16:57:24 +0200
Hi,
Le vendredi 15 août 2008 à 10:46 -0300, Sébastien Tandel a écrit :

> 
> it is already not a so simple inspection path to check that if
> ipfd_head != NULL, it implies that msp != NULL ...  even for a
> human! :-p
> I don't think it costs a lot to have something like the following for
> the last "if" of the excerpt :
> 
> 
> if (msp && ipfd_head) {
>   ...
>   tcpinfo->seq = msp->seq;
>   ...
> }
> 
> 
> and it should let lint happy ... and humans too héhé ;)

And so if you use tools a little less brain dead than lint you get:
ipfd_head: always true condition.

lint can find bugs, but it has a very high rate of false positive, you
have to live with it. I thought that after the debian debacle about ssl
we should be a little wiser about that kind of spurious code
modification.

Didier