diff options
author | Quentin Young <qlyoung@cumulusnetworks.com> | 2017-05-05 23:22:25 +0200 |
---|---|---|
committer | Quentin Young <qlyoung@cumulusnetworks.com> | 2017-05-09 22:44:22 +0200 |
commit | 66e78ae64bc4659848517953b365606e3e70e878 (patch) | |
tree | ef1339e397feed2b56b8d653d41c03aa5b2bd94f /ospfd/ospf_spf.c | |
parent | lib: safely check & set thread pointers (diff) | |
download | frr-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 'ospfd/ospf_spf.c')
-rw-r--r-- | ospfd/ospf_spf.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/ospfd/ospf_spf.c b/ospfd/ospf_spf.c index d54ebc8b4..3d8d7f8e0 100644 --- a/ospfd/ospf_spf.c +++ b/ospfd/ospf_spf.c @@ -1464,6 +1464,7 @@ ospf_spf_calculate_schedule (struct ospf *ospf, ospf_spf_reason_t reason) zlog_info ("SPF: Scheduled in %ld msec", delay); - ospf->t_spf_calc = - thread_add_timer_msec(master, ospf_spf_calculate_timer, ospf, delay, NULL); + ospf->t_spf_calc = NULL; + thread_add_timer_msec(master, ospf_spf_calculate_timer, ospf, delay, + &ospf->t_spf_calc); } |