From 074c80b705faa21f1347383ec6310ea17a00ffc2 Mon Sep 17 00:00:00 2001 From: Donald Sharp Date: Wed, 14 Dec 2022 14:05:11 -0500 Subject: lib, tests, zebra: Remove unused workqueue error function The wq->spec.errorfunc is never used in the code. It's been in the code base since 2005 and I also do not remember ever seeing it being called. No workqueue process function ever returns error. Since it's not used let's just remove it from the code base. Signed-off-by: Donald Sharp --- lib/workqueue.c | 7 ------- 1 file changed, 7 deletions(-) (limited to 'lib/workqueue.c') diff --git a/lib/workqueue.c b/lib/workqueue.c index c703de90b3..a5338ba78b 100644 --- a/lib/workqueue.c +++ b/lib/workqueue.c @@ -272,9 +272,6 @@ void work_queue_run(struct thread *thread) /* dont run items which are past their allowed retries */ if (item->ran > wq->spec.max_retries) { - /* run error handler, if any */ - if (wq->spec.errorfunc) - wq->spec.errorfunc(wq, item); work_queue_item_remove(wq, item); continue; } @@ -317,10 +314,6 @@ void work_queue_run(struct thread *thread) case WQ_RETRY_NOW: /* a RETRY_NOW that gets here has exceeded max_tries, same as * ERROR */ - case WQ_ERROR: { - if (wq->spec.errorfunc) - wq->spec.errorfunc(wq, item); - } /* fallthru */ case WQ_SUCCESS: default: { -- cgit v1.2.3