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.
Acked-by: Scott Feldman <sfeldma@cumulusnetworks.com>
Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
#define ALL_LIST_ELEMENTS(list,node,nextnode,data) \
(node) = listhead(list), ((data) = NULL); \
(node) != NULL && \
- ((data) = listgetdata(node),(nextnode) = listnextnode(node), 1); \
+ ((data) = listgetdata(node),(nextnode) = node->next, 1); \
(node) = (nextnode), ((data) = NULL)
/* read-only list iteration macro.