odp-util: Format and scan multiple MPLS labels.
[cascardo/ovs.git] / lib / list.h
index 5ad54b8..f9c9d85 100644 (file)
@@ -26,8 +26,8 @@
 /* "struct ovs_list" with pointers that will (probably) cause segfaults if
  * dereferenced and, better yet, show up clearly in a debugger. */
 #define OVS_LIST_POISON \
-    (struct ovs_list) { (void *) (uintptr_t) 0xccccccccccccccccULL, \
-                        (void *) (uintptr_t) 0xccccccccccccccccULL }
+(struct ovs_list) { (struct ovs_list *) (uintptr_t) 0xccccccccccccccccULL, \
+                    (struct ovs_list *) (uintptr_t) 0xccccccccccccccccULL }
 
 static inline void list_init(struct ovs_list *);
 static inline void list_poison(struct ovs_list *);
@@ -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)                       \