]> git.proxmox.com Git - mirror_ovs.git/blobdiff - lib/ofpbuf.c
lib/list: Add LIST_FOR_EACH_POP.
[mirror_ovs.git] / lib / ofpbuf.c
index 7510edb9b334b849dadfeda8f57943071bfc4b63..c27c552047970b875f9a744fe47cd008d60ea46d 100644 (file)
@@ -477,10 +477,9 @@ ofpbuf_to_string(const struct ofpbuf *b, size_t maxbytes)
 void
 ofpbuf_list_delete(struct ovs_list *list)
 {
-    struct ofpbuf *b, *next;
+    struct ofpbuf *b;
 
-    LIST_FOR_EACH_SAFE (b, next, list_node, list) {
-        list_remove(&b->list_node);
+    LIST_FOR_EACH_POP (b, list_node, list) {
         ofpbuf_delete(b);
     }
 }