summaryrefslogtreecommitdiff
path: root/zebra/irdp_main.c
diff options
context:
space:
mode:
authorQuentin Young <qlyoung@cumulusnetworks.com>2017-05-05 21:22:25 +0000
committerQuentin Young <qlyoung@cumulusnetworks.com>2017-05-09 20:44:22 +0000
commit66e78ae64bc4659848517953b365606e3e70e878 (patch)
treeef1339e397feed2b56b8d653d41c03aa5b2bd94f /zebra/irdp_main.c
parent32d86f8b7a327cfc6904d51d5c3ea8f5c6115e44 (diff)
*: update thread_add_* calls
Pass pointer to pointer instead of assigning by return value. See previous commit message. To ensure that the behavior stays functionally correct, any assignments with the result of a thread_add* function have been transformed to set the pointer to null before passing it. These can be removed wherever the pointer is known to already be null. Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
Diffstat (limited to 'zebra/irdp_main.c')
-rw-r--r--zebra/irdp_main.c13
1 files changed, 8 insertions, 5 deletions
diff --git a/zebra/irdp_main.c b/zebra/irdp_main.c
index 963c330af4..5c17570f05 100644
--- a/zebra/irdp_main.c
+++ b/zebra/irdp_main.c
@@ -114,7 +114,8 @@ irdp_sock_init (void)
return ret;
};
- t_irdp_raw = thread_add_read(zebrad.master, irdp_read_raw, NULL, sock, NULL);
+ t_irdp_raw = NULL;
+ thread_add_read(zebrad.master, irdp_read_raw, NULL, sock, &t_irdp_raw);
return sock;
}
@@ -244,8 +245,9 @@ int irdp_send_thread(struct thread *t_advert)
if(irdp->flags & IF_DEBUG_MISC)
zlog_debug("IRDP: New timer for %s set to %u\n", ifp->name, timer);
- irdp->t_advertise = thread_add_timer(zebrad.master, irdp_send_thread, ifp,
- timer, NULL);
+ irdp->t_advertise = NULL;
+ thread_add_timer(zebrad.master, irdp_send_thread, ifp, timer,
+ &irdp->t_advertise);
return 0;
}
@@ -297,8 +299,9 @@ void process_solicit (struct interface *ifp)
timer = (random () % MAX_RESPONSE_DELAY) + 1;
- irdp->t_advertise = thread_add_timer(zebrad.master, irdp_send_thread, ifp,
- timer, NULL);
+ irdp->t_advertise = NULL;
+ thread_add_timer(zebrad.master, irdp_send_thread, ifp, timer,
+ &irdp->t_advertise);
}
void irdp_finish()