mirror of
https://git.proxmox.com/git/mirror_frr
synced 2025-08-05 10:08:41 +00:00
libs: remove useless static work_queue_free helper
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>
This commit is contained in:
parent
b7777b57c4
commit
6b097e3379
@ -99,11 +99,10 @@ struct work_queue *work_queue_new(struct thread_master *m,
|
|||||||
return new;
|
return new;
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
void work_queue_free_and_null(struct work_queue **wqp)
|
||||||
* Internal helper api; used to be public.
|
|
||||||
*/
|
|
||||||
static void work_queue_free_original(struct work_queue *wq)
|
|
||||||
{
|
{
|
||||||
|
struct work_queue *wq = *wqp;
|
||||||
|
|
||||||
if (wq->thread != NULL)
|
if (wq->thread != NULL)
|
||||||
thread_cancel(wq->thread);
|
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_NAME, wq->name);
|
||||||
XFREE(MTYPE_WORK_QUEUE, wq);
|
XFREE(MTYPE_WORK_QUEUE, wq);
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
void work_queue_free_and_null(struct work_queue **wq)
|
*wqp = NULL;
|
||||||
{
|
|
||||||
work_queue_free_original(*wq);
|
|
||||||
*wq = NULL;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
bool work_queue_is_scheduled(struct work_queue *wq)
|
bool work_queue_is_scheduled(struct work_queue *wq)
|
||||||
|
Loading…
Reference in New Issue
Block a user