summaryrefslogtreecommitdiff
path: root/ofproto/ofproto-dpif-rid.c
diff options
context:
space:
mode:
authorJarno Rajahalme <jrajahalme@nicira.com>2015-04-06 14:02:28 -0700
committerJarno Rajahalme <jrajahalme@nicira.com>2015-04-06 14:02:28 -0700
commit5f03c98321092da7ff0246117098a7df197b2ce2 (patch)
treed9369df816d0776b79dff4a9eeed375f839776a7 /ofproto/ofproto-dpif-rid.c
parent660527a420c29bdbc0cddd51438980ee712ba591 (diff)
downloadopenvswitch-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/ofproto-dpif-rid.c')
-rw-r--r--ofproto/ofproto-dpif-rid.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/ofproto/ofproto-dpif-rid.c b/ofproto/ofproto-dpif-rid.c
index 17bcede62..f1b3bdcf8 100644
--- a/ofproto/ofproto-dpif-rid.c
+++ b/ofproto/ofproto-dpif-rid.c
@@ -67,7 +67,7 @@ recirc_run(void)
/* Do maintenance at most 4 times / sec. */
ovs_mutex_lock(&mutex);
if (now - last > 250) {
- struct recirc_id_node *node, *next;
+ struct recirc_id_node *node;
last = now;
@@ -86,8 +86,7 @@ recirc_run(void)
/* Delete the expired. These have been lingering for at least 250 ms,
* which should be enough for any ongoing recirculations to be
* finished. */
- LIST_FOR_EACH_SAFE (node, next, exp_node, &expired) {
- list_remove(&node->exp_node);
+ LIST_FOR_EACH_POP (node, exp_node, &expired) {
cmap_remove(&id_map, &node->id_node, node->id);
ovsrcu_postpone(free, node);
}