The definition of the INIT_CONTAINER macro initializes ITER to NULL, it will cause a segmentation fault when it is deferenced on (ITER)->MEMBER.next, then, I changed it to the ASSIGN_CONTAINER macro that does not initialize ITER.
Signed-off-by: Mauricio Vasquez B <mauricio.vasquezber...@studenti.polito.it > --- lib/list.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/list.h b/lib/list.h index 5ad54b8..db4a613 100644 --- a/lib/list.h +++ b/lib/list.h @@ -62,7 +62,7 @@ static inline bool list_is_short(const struct ovs_list *); &(ITER)->MEMBER != (LIST); \ ASSIGN_CONTAINER(ITER, (ITER)->MEMBER.next, MEMBER)) #define LIST_FOR_EACH_CONTINUE(ITER, MEMBER, LIST) \ - for (INIT_CONTAINER(ITER, (ITER)->MEMBER.next, MEMBER); \ + for (ASSIGN_CONTAINER(ITER, (ITER)->MEMBER.next, MEMBER); \ &(ITER)->MEMBER != (LIST); \ ASSIGN_CONTAINER(ITER, (ITER)->MEMBER.next, MEMBER)) #define LIST_FOR_EACH_REVERSE(ITER, MEMBER, LIST) \ -- _______________________________________________ dev mailing list dev@openvswitch.org http://openvswitch.org/mailman/listinfo/dev