diff options
| author | Donald Sharp <sharpd@cumulusnetworks.com> | 2019-02-07 17:24:06 -0500 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2019-02-07 17:24:06 -0500 |
| commit | aef69c4feab965298bdb176c0fcebddb533a4066 (patch) | |
| tree | eba0b06be9755ba6e2665263821c8c099bc67468 /lib/workqueue.c | |
| parent | 1632290b3f5e84a2cd5278f24474e49d90c3e1ed (diff) | |
| parent | 6b097e33797e64aa652df19f87cfa00384884a3a (diff) | |
Merge pull request #3752 from mjstapp/fix_wq_static_func
libs: remove useless static work_queue_free helper
Diffstat (limited to 'lib/workqueue.c')
| -rw-r--r-- | lib/workqueue.c | 14 |
1 files changed, 4 insertions, 10 deletions
diff --git a/lib/workqueue.c b/lib/workqueue.c index 93bbc52e3b..fa69ec600e 100644 --- a/lib/workqueue.c +++ b/lib/workqueue.c @@ -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) |
