summaryrefslogtreecommitdiff
path: root/zebra/zebra_rib.c
diff options
context:
space:
mode:
authorJorge Boncompte <jbonor@gmail.com>2017-08-08 20:32:30 +0200
committerJorge Boncompte <jbonor@gmail.com>2017-08-17 17:47:07 +0200
commitf104f6c1a62c92a4420e1d99abb336d566c1ff51 (patch)
treeb3eceba4d39ae56d9e8eff27e4a2bb16f1024b82 /zebra/zebra_rib.c
parentcd85bc2e0bd8657cb2555fe8d631a2b0d916588e (diff)
lib: cleanup the work queue implementation
Convert the work queue implementation to not use the generic linked list to mantain the item list and use instead a simple queue from queue.h that does not allocate memory for each node. Signed-off-by: Jorge Boncompte <jbonor@gmail.com>
Diffstat (limited to 'zebra/zebra_rib.c')
-rw-r--r--zebra/zebra_rib.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/zebra/zebra_rib.c b/zebra/zebra_rib.c
index ed53554265..b27201616d 100644
--- a/zebra/zebra_rib.c
+++ b/zebra/zebra_rib.c
@@ -1820,7 +1820,7 @@ void rib_queue_add(struct route_node *rn)
* holder, if necessary, then push the work into it in any case.
* This semantics was introduced after 0.99.9 release.
*/
- if (!zebrad.ribq->items->count)
+ if (work_queue_empty(zebrad.ribq))
work_queue_add(zebrad.ribq, zebrad.mq);
rib_meta_queue_add(zebrad.mq, rn);