]> git.puffer.fish Git - mirror/frr.git/commitdiff
lib: STAILQ_FOREACH_SAFE never gives a null elem
authorQuentin Young <qlyoung@cumulusnetworks.com>
Mon, 25 Feb 2019 20:05:08 +0000 (20:05 +0000)
committerQuentin Young <qlyoung@cumulusnetworks.com>
Mon, 25 Feb 2019 23:00:46 +0000 (23:00 +0000)
So don't check it

Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
lib/workqueue.c

index fa69ec600ec93180ea90ac4e4c27c143601f2991..066d81f35020e66998fe59ec3ce75ef1754ee2b1 100644 (file)
@@ -274,7 +274,7 @@ int work_queue_run(struct thread *thread)
                wq->cycles.granularity = WORK_QUEUE_MIN_GRANULARITY;
 
        STAILQ_FOREACH_SAFE (item, &wq->items, wq, titem) {
-               assert(item && item->data);
+               assert(item->data);
 
                /* dont run items which are past their allowed retries */
                if (item->ran > wq->spec.max_retries) {