From b3d6bc6ef0140a194b4bc2993a6aba72ab5d54c9 Mon Sep 17 00:00:00 2001 From: Mark Stapp Date: Mon, 6 Jul 2020 12:55:03 -0400 Subject: * : update signature of thread_cancel api Change thread_cancel to take a ** to an event, NULL-check before dereferencing, and NULL the caller's pointer. Update many callers to use the new signature. Signed-off-by: Mark Stapp --- isisd/isis_tx_queue.c | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) (limited to 'isisd/isis_tx_queue.c') diff --git a/isisd/isis_tx_queue.c b/isisd/isis_tx_queue.c index 1424b55bdc..5c87e39157 100644 --- a/isisd/isis_tx_queue.c +++ b/isisd/isis_tx_queue.c @@ -93,8 +93,7 @@ static void tx_queue_element_free(void *element) { struct isis_tx_queue_entry *e = element; - if (e->retry) - thread_cancel(e->retry); + thread_cancel(&(e->retry)); XFREE(MTYPE_TX_QUEUE_ENTRY, e); } @@ -166,8 +165,7 @@ void _isis_tx_queue_add(struct isis_tx_queue *queue, e->type = type; - if (e->retry) - thread_cancel(e->retry); + thread_cancel(&(e->retry)); thread_add_event(master, tx_queue_send_event, e, 0, &e->retry); e->is_retry = false; @@ -190,8 +188,7 @@ void _isis_tx_queue_del(struct isis_tx_queue *queue, struct isis_lsp *lsp, func, file, line); } - if (e->retry) - thread_cancel(e->retry); + thread_cancel(&(e->retry)); hash_release(queue->hash, e); XFREE(MTYPE_TX_QUEUE_ENTRY, e); -- cgit v1.2.3