Hi Dirk, > On 23 Jun 2015, at 02:53, Dirk Hohndel <[email protected]> wrote: > > I tried to close a few dozen Coverity issues and > ended up changing some of those very same conditional statements since > Coverity convinced me that it was possible for nextdp to be NULL...
looks good to me. But I think those tests you inserted are not needed: In particular in the very long in clause, there is early in the long list of ||’s a !dp->next and as there is logic short circuit and the standard says || is evaluated left to right it should be safe to evaluate dp->next right of that statement and it does not have to be tested again. In my experience with that part of the code, forgetting to test dp->next leads very reliably to crashes (I had forgotten some before) so the fact it does not immediately crash makes me quite confident the above is true ;-) Best Robert
signature.asc
Description: Message signed with OpenPGP using GPGMail
_______________________________________________ subsurface mailing list [email protected] http://lists.subsurface-divelog.org/cgi-bin/mailman/listinfo/subsurface
