From 1383ff9c51dd58ed84021fafb14f7c2e27b7666b Mon Sep 17 00:00:00 2001 From: Quentin Young Date: Mon, 25 Feb 2019 20:05:08 +0000 Subject: [PATCH] lib: STAILQ_FOREACH_SAFE never gives a null elem So don't check it Signed-off-by: Quentin Young --- lib/workqueue.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/workqueue.c b/lib/workqueue.c index fa69ec600e..066d81f350 100644 --- a/lib/workqueue.c +++ b/lib/workqueue.c @@ -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) { -- 2.39.5