[quagga-dev 10166] Re: [PATCH] lib: remove ALL_LIST_ELEMENTS dead code branch
equinox at opensourcerouting.org
Fri Jan 11 21:10:34 GMT 2013
On Tue, Nov 27, 2012 at 03:21:44AM +0100, David Lamparter wrote:
> ALL_LIST_ELEMENTS is checking node == NULL twice, which is causing a
> whole slew of false positives in Coverity. In this particular case,
> addressing this in the code is reasonable; being a macro, this appears
> all over the place without easy remedy.
> - ((data) = listgetdata(node),(nextnode) = listnextnode(node), 1); \
> + ((data) = listgetdata(node),(nextnode) = node->next, 1); \
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 230 bytes
Desc: Digital signature
More information about the Quagga-dev