diff options
| author | Quentin Young <qlyoung@cumulusnetworks.com> | 2017-05-05 21:22:25 +0000 | 
|---|---|---|
| committer | Quentin Young <qlyoung@cumulusnetworks.com> | 2017-05-09 20:44:22 +0000 | 
| commit | 66e78ae64bc4659848517953b365606e3e70e878 (patch) | |
| tree | ef1339e397feed2b56b8d653d41c03aa5b2bd94f /ldpd/adjacency.c | |
| parent | 32d86f8b7a327cfc6904d51d5c3ea8f5c6115e44 (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 'ldpd/adjacency.c')
| -rw-r--r-- | ldpd/adjacency.c | 11 | 
1 files changed, 6 insertions, 5 deletions
diff --git a/ldpd/adjacency.c b/ldpd/adjacency.c index e8bc58b7e8..52e2776654 100644 --- a/ldpd/adjacency.c +++ b/ldpd/adjacency.c @@ -206,8 +206,9 @@ void  adj_start_itimer(struct adj *adj)  {  	THREAD_TIMER_OFF(adj->inactivity_timer); -	adj->inactivity_timer = thread_add_timer(master, adj_itimer, adj, -						 adj->holdtime, NULL); +	adj->inactivity_timer = NULL; +	thread_add_timer(master, adj_itimer, adj, adj->holdtime, +			 &adj->inactivity_timer);  }  void @@ -366,9 +367,9 @@ static void  tnbr_start_hello_timer(struct tnbr *tnbr)  {  	THREAD_TIMER_OFF(tnbr->hello_timer); -	tnbr->hello_timer = thread_add_timer(master, tnbr_hello_timer, tnbr, -					     tnbr_get_hello_interval(tnbr), -					     NULL); +	tnbr->hello_timer = NULL; +	thread_add_timer(master, tnbr_hello_timer, tnbr, tnbr_get_hello_interval(tnbr), +			 &tnbr->hello_timer);  }  static void  | 
