diff options
author | Jarno Rajahalme <jrajahalme@nicira.com> | 2015-04-06 14:02:28 -0700 |
---|---|---|
committer | Jarno Rajahalme <jrajahalme@nicira.com> | 2015-04-06 14:02:28 -0700 |
commit | 5f03c98321092da7ff0246117098a7df197b2ce2 (patch) | |
tree | d9369df816d0776b79dff4a9eeed375f839776a7 /lib/ofpbuf.c | |
parent | 660527a420c29bdbc0cddd51438980ee712ba591 (diff) | |
download | openvswitch-5f03c98321092da7ff0246117098a7df197b2ce2.tar.gz |
lib/list: Add LIST_FOR_EACH_POP.
Makes popping each member of the list a bit easier.
Signed-off-by: Jarno Rajahalme <jrajahalme@nicira.com>
Acked-by: Russell Bryant <rbryant@redhat.com>
Acked-by: Ben Pfaff <blp@nicira.com>
Diffstat (limited to 'lib/ofpbuf.c')
-rw-r--r-- | lib/ofpbuf.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/lib/ofpbuf.c b/lib/ofpbuf.c index 7510edb9b..c27c55204 100644 --- a/lib/ofpbuf.c +++ b/lib/ofpbuf.c @@ -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); } } |