summaryrefslogtreecommitdiffstats
path: root/ospf6d/ospf6_interface.c
diff options
context:
space:
mode:
authorQuentin Young <qlyoung@cumulusnetworks.com>2017-05-05 23:22:25 +0200
committerQuentin Young <qlyoung@cumulusnetworks.com>2017-05-09 22:44:22 +0200
commit66e78ae64bc4659848517953b365606e3e70e878 (patch)
treeef1339e397feed2b56b8d653d41c03aa5b2bd94f /ospf6d/ospf6_interface.c
parentlib: safely check & set thread pointers (diff)
downloadfrr-66e78ae64bc4659848517953b365606e3e70e878.tar.xz
frr-66e78ae64bc4659848517953b365606e3e70e878.zip
*: 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 'ospf6d/ospf6_interface.c')
-rw-r--r--ospf6d/ospf6_interface.c11
1 files changed, 6 insertions, 5 deletions
diff --git a/ospf6d/ospf6_interface.c b/ospf6d/ospf6_interface.c
index d75b1098f..758688c60 100644
--- a/ospf6d/ospf6_interface.c
+++ b/ospf6d/ospf6_interface.c
@@ -752,9 +752,10 @@ interface_up (struct thread *thread)
/* Schedule Hello */
if (! CHECK_FLAG (oi->flag, OSPF6_INTERFACE_PASSIVE) &&
- !if_is_loopback (oi->interface))
- oi->thread_send_hello = thread_add_event(master, ospf6_hello_send, oi, 0,
- NULL);
+ !if_is_loopback (oi->interface)) {
+ oi->thread_send_hello = NULL;
+ thread_add_event(master, ospf6_hello_send, oi, 0, &oi->thread_send_hello);
+ }
/* decide next interface state */
if ((if_is_pointopoint (oi->interface)) ||
@@ -1517,8 +1518,8 @@ DEFUN (no_ipv6_ospf6_passive,
UNSET_FLAG (oi->flag, OSPF6_INTERFACE_PASSIVE);
THREAD_OFF (oi->thread_send_hello);
- oi->thread_send_hello =
- thread_add_event(master, ospf6_hello_send, oi, 0, NULL);
+ oi->thread_send_hello = NULL;
+ thread_add_event(master, ospf6_hello_send, oi, 0, &oi->thread_send_hello);
return CMD_SUCCESS;
}