summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorDavid Lamparter <equinox@opensourcerouting.org>2012-11-27 03:21:44 +0100
committerDavid Lamparter <equinox@opensourcerouting.org>2013-01-11 22:09:34 +0100
commita5c851c7ff41ef846e83d62394176ac1753ebf45 (patch)
treeb53c24d74e7db4d5e6cdd30199cb39093df0a5a4 /lib
parent913ff66ba30093d2fdc26af215f4bc0b3d359d75 (diff)
lib: remove ALL_LIST_ELEMENTS dead code branch
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>
Diffstat (limited to 'lib')
-rw-r--r--lib/linklist.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/linklist.h b/lib/linklist.h
index f0ae3625..24a9e206 100644
--- a/lib/linklist.h
+++ b/lib/linklist.h
@@ -90,7 +90,7 @@ extern void list_add_list (struct list *, struct list *);
#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.