Collapse the old static free function into the actual public
function that was using it (and the only user of it.)
Signed-off-by: Mark Stapp <mjs@voltanet.io>
return new;
}
-/*
- * Internal helper api; used to be public.
- */
-static void work_queue_free_original(struct work_queue *wq)
+void work_queue_free_and_null(struct work_queue **wqp)
{
+ struct work_queue *wq = *wqp;
+
if (wq->thread != NULL)
thread_cancel(wq->thread);
XFREE(MTYPE_WORK_QUEUE_NAME, wq->name);
XFREE(MTYPE_WORK_QUEUE, wq);
- return;
-}
-void work_queue_free_and_null(struct work_queue **wq)
-{
- work_queue_free_original(*wq);
- *wq = NULL;
+ *wqp = NULL;
}
bool work_queue_is_scheduled(struct work_queue *wq)