summaryrefslogtreecommitdiff
path: root/ripngd/ripng_peer.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 /ripngd/ripng_peer.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 'ripngd/ripng_peer.c')
-rw-r--r--ripngd/ripng_peer.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/ripngd/ripng_peer.c b/ripngd/ripng_peer.c
index 61f7b7b9df..69af4f214f 100644
--- a/ripngd/ripng_peer.c
+++ b/ripngd/ripng_peer.c
@@ -115,8 +115,9 @@ ripng_peer_get (struct in6_addr *addr)
}
/* Update timeout thread. */
- peer->t_timeout = thread_add_timer(master, ripng_peer_timeout, peer,
- RIPNG_PEER_TIMER_DEFAULT, NULL);
+ peer->t_timeout = NULL;
+ thread_add_timer(master, ripng_peer_timeout, peer, RIPNG_PEER_TIMER_DEFAULT,
+ &peer->t_timeout);
/* Last update time set. */
time (&peer->uptime);