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 /ofproto/bundles.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 'ofproto/bundles.c')
-rw-r--r-- | ofproto/bundles.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/ofproto/bundles.c b/ofproto/bundles.c index 4d9deacf9..c40909150 100644 --- a/ofproto/bundles.c +++ b/ofproto/bundles.c @@ -100,11 +100,10 @@ ofp_bundle_create(uint32_t id, uint16_t flags) static void ofp_bundle_remove(struct ofconn *ofconn, struct ofp_bundle *item) { - struct bundle_message *msg, *next; + struct bundle_message *msg; struct hmap *bundles; - LIST_FOR_EACH_SAFE (msg, next, node, &item->msg_list) { - list_remove(&msg->node); + LIST_FOR_EACH_POP (msg, node, &item->msg_list) { free(msg->msg); free(msg); } |