diff options
| author | Mark Stapp <mjs@voltanet.io> | 2020-07-06 12:55:03 -0400 |
|---|---|---|
| committer | Mark Stapp <mjs@voltanet.io> | 2020-10-23 08:59:34 -0400 |
| commit | b3d6bc6ef0140a194b4bc2993a6aba72ab5d54c9 (patch) | |
| tree | b5ef6dcab41d9da516a6ff044056e0faca7b35da /ripngd/ripng_peer.c | |
| parent | 90a65457d12d8d90bf47eab1a4bb5446b3810d96 (diff) | |
* : update signature of thread_cancel api
Change thread_cancel to take a ** to an event, NULL-check
before dereferencing, and NULL the caller's pointer. Update
many callers to use the new signature.
Signed-off-by: Mark Stapp <mjs@voltanet.io>
Diffstat (limited to 'ripngd/ripng_peer.c')
| -rw-r--r-- | ripngd/ripng_peer.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/ripngd/ripng_peer.c b/ripngd/ripng_peer.c index e6ff58dd0c..0ac489c67e 100644 --- a/ripngd/ripng_peer.c +++ b/ripngd/ripng_peer.c @@ -95,8 +95,7 @@ static struct ripng_peer *ripng_peer_get(struct ripng *ripng, peer = ripng_peer_lookup(ripng, addr); if (peer) { - if (peer->t_timeout) - thread_cancel(peer->t_timeout); + thread_cancel(&peer->t_timeout); } else { peer = ripng_peer_new(); peer->ripng = ripng; @@ -105,7 +104,6 @@ static struct ripng_peer *ripng_peer_get(struct ripng *ripng, } /* Update timeout thread. */ - peer->t_timeout = NULL; thread_add_timer(master, ripng_peer_timeout, peer, RIPNG_PEER_TIMER_DEFAULT, &peer->t_timeout); |
