diff options
author | Mark Stapp <mjs@voltanet.io> | 2020-07-06 18:55:03 +0200 |
---|---|---|
committer | Mark Stapp <mjs@voltanet.io> | 2020-10-23 14:59:34 +0200 |
commit | b3d6bc6ef0140a194b4bc2993a6aba72ab5d54c9 (patch) | |
tree | b5ef6dcab41d9da516a6ff044056e0faca7b35da /ripd | |
parent | Merge pull request #7345 from opensourcerouting/bgp-aggr-suppress (diff) | |
download | frr-b3d6bc6ef0140a194b4bc2993a6aba72ab5d54c9.tar.xz frr-b3d6bc6ef0140a194b4bc2993a6aba72ab5d54c9.zip |
* : 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 'ripd')
-rw-r--r-- | ripd/rip_interface.c | 5 | ||||
-rw-r--r-- | ripd/rip_peer.c | 3 |
2 files changed, 2 insertions, 6 deletions
diff --git a/ripd/rip_interface.c b/ripd/rip_interface.c index c2cee4d69..c601ab404 100644 --- a/ripd/rip_interface.c +++ b/ripd/rip_interface.c @@ -468,10 +468,7 @@ static void rip_interface_clean(struct rip_interface *ri) ri->enable_interface = 0; ri->running = 0; - if (ri->t_wakeup) { - thread_cancel(ri->t_wakeup); - ri->t_wakeup = NULL; - } + thread_cancel(&ri->t_wakeup); } void rip_interfaces_clean(struct rip *rip) diff --git a/ripd/rip_peer.c b/ripd/rip_peer.c index 4c5233c82..23599f087 100644 --- a/ripd/rip_peer.c +++ b/ripd/rip_peer.c @@ -86,8 +86,7 @@ static struct rip_peer *rip_peer_get(struct rip *rip, struct in_addr *addr) peer = rip_peer_lookup(rip, addr); if (peer) { - if (peer->t_timeout) - thread_cancel(peer->t_timeout); + thread_cancel(&peer->t_timeout); } else { peer = rip_peer_new(); peer->rip = rip; |