From 803f51efe8798a36404f8c857052828afb37b1e2 Mon Sep 17 00:00:00 2001 From: Ariadne Conill Date: Sat, 18 Jul 2020 03:01:15 -0600 Subject: [PATCH] list: fix LIF_LIST_FOREACH_SAFE --- libifupdown/list.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libifupdown/list.h b/libifupdown/list.h index d3c5168..326eca0 100644 --- a/libifupdown/list.h +++ b/libifupdown/list.h @@ -37,6 +37,6 @@ extern void lif_node_delete(struct lif_node *node, struct lif_list *list); for ((iter) = (head); (iter) != NULL; (iter) = (iter)->next) #define LIF_LIST_FOREACH_SAFE(iter, iter_next, head) \ - for ((iter) = (head); (iter) != NULL; (iter) = (iter_next), (iter_next) = (iter) != NULL ? (iter)->next : NULL) + for ((iter) = (head), (iter_next) = (iter)->next; (iter) != NULL; (iter) = (iter_next), (iter_next) = (iter) != NULL ? (iter)->next : NULL) #endif