]> git.puffer.fish Git - mirror/frr.git/commitdiff
libs: remove useless static work_queue_free helper 3752/head
authorMark Stapp <mjs@voltanet.io>
Thu, 7 Feb 2019 18:54:50 +0000 (13:54 -0500)
committerMark Stapp <mjs@voltanet.io>
Thu, 7 Feb 2019 18:54:50 +0000 (13:54 -0500)
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>
lib/workqueue.c

index 93bbc52e3b3ba93bb54c0dc8a7c235e8be91b4c3..fa69ec600ec93180ea90ac4e4c27c143601f2991 100644 (file)
@@ -99,11 +99,10 @@ struct work_queue *work_queue_new(struct thread_master *m,
        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);
 
@@ -117,13 +116,8 @@ static void work_queue_free_original(struct work_queue *wq)
 
        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)