diff options
| author | Donatas Abraitis <donatas.abraitis@gmail.com> | 2021-10-04 19:25:43 +0300 | 
|---|---|---|
| committer | Donatas Abraitis <donatas.abraitis@gmail.com> | 2021-10-04 19:29:06 +0300 | 
| commit | 56fb2134937086781e73de7490296b01414e0fe9 (patch) | |
| tree | 6250a0b5af3caaa641df1ba46e7dde0bf35463af /nhrpd | |
| parent | dc4a902689e46717e2f7c34d3546e7b5b78cb3d1 (diff) | |
nhrpd: Do not explicitly set the thread pointer to NULL
FRR should only ever use the appropriate THREAD_ON/THREAD_OFF
semantics.  This is espacially true for the functions we
end up calling the thread for.
Signed-off-by: Donatas Abraitis <donatas.abraitis@gmail.com>
Diffstat (limited to 'nhrpd')
| -rw-r--r-- | nhrpd/netlink_arp.c | 1 | ||||
| -rw-r--r-- | nhrpd/nhrp_event.c | 3 | ||||
| -rw-r--r-- | nhrpd/nhrp_multicast.c | 1 | ||||
| -rw-r--r-- | nhrpd/nhrp_nhs.c | 3 | ||||
| -rw-r--r-- | nhrpd/nhrp_peer.c | 1 | ||||
| -rw-r--r-- | nhrpd/nhrp_shortcut.c | 1 | ||||
| -rw-r--r-- | nhrpd/vici.c | 3 | 
7 files changed, 0 insertions, 13 deletions
diff --git a/nhrpd/netlink_arp.c b/nhrpd/netlink_arp.c index 5fcb311888..0a618056d5 100644 --- a/nhrpd/netlink_arp.c +++ b/nhrpd/netlink_arp.c @@ -107,7 +107,6 @@ static int netlink_log_recv(struct thread *t)  	struct zbuf payload, zb;  	struct nlmsghdr *n; -	netlink_log_thread = NULL;  	zbuf_init(&zb, buf, sizeof(buf), 0);  	while (zbuf_recv(&zb, fd) > 0) { diff --git a/nhrpd/nhrp_event.c b/nhrpd/nhrp_event.c index f784ef22d6..206b2caccf 100644 --- a/nhrpd/nhrp_event.c +++ b/nhrpd/nhrp_event.c @@ -84,7 +84,6 @@ static int evmgr_read(struct thread *t)  	struct zbuf *ibuf = &evmgr->ibuf;  	struct zbuf msg; -	evmgr->t_read = NULL;  	if (zbuf_read(ibuf, evmgr->fd, (size_t)-1) < 0) {  		evmgr_connection_error(evmgr);  		return 0; @@ -103,7 +102,6 @@ static int evmgr_write(struct thread *t)  	struct event_manager *evmgr = THREAD_ARG(t);  	int r; -	evmgr->t_write = NULL;  	r = zbufq_write(&evmgr->obuf, evmgr->fd);  	if (r > 0) {  		thread_add_write(master, evmgr_write, evmgr, evmgr->fd, @@ -193,7 +191,6 @@ static int evmgr_reconnect(struct thread *t)  	struct event_manager *evmgr = THREAD_ARG(t);  	int fd; -	evmgr->t_reconnect = NULL;  	if (evmgr->fd >= 0 || !nhrp_event_socket_path)  		return 0; diff --git a/nhrpd/nhrp_multicast.c b/nhrpd/nhrp_multicast.c index b78afda2c4..339b6dfabe 100644 --- a/nhrpd/nhrp_multicast.c +++ b/nhrpd/nhrp_multicast.c @@ -149,7 +149,6 @@ static int netlink_mcast_log_recv(struct thread *t)  	struct zbuf payload, zb;  	struct nlmsghdr *n; -	netlink_mcast_log_thread = NULL;  	zbuf_init(&zb, buf, sizeof(buf), 0);  	while (zbuf_recv(&zb, fd) > 0) { diff --git a/nhrpd/nhrp_nhs.c b/nhrpd/nhrp_nhs.c index 9dfaf073d8..5179f15ebf 100644 --- a/nhrpd/nhrp_nhs.c +++ b/nhrpd/nhrp_nhs.c @@ -112,7 +112,6 @@ static int nhrp_reg_timeout(struct thread *t)  	struct nhrp_registration *r = THREAD_ARG(t);  	struct nhrp_cache *c; -	r->t_register = NULL;  	if (r->timeout >= 16 && sockunion_family(&r->proto_addr) != AF_UNSPEC) {  		nhrp_reqid_free(&nhrp_packet_reqid, &r->reqid); @@ -176,7 +175,6 @@ static int nhrp_reg_send_req(struct thread *t)  	struct nhrp_extension_header *ext;  	struct nhrp_cie_header *cie; -	r->t_register = NULL;  	if (!nhrp_peer_check(r->peer, 2)) {  		debugf(NHRP_DEBUG_COMMON, "NHS: Waiting link for %pSU",  		       &r->peer->vc->remote.nbma); @@ -281,7 +279,6 @@ static void nhrp_nhs_resolve_cb(struct resolver_query *q, const char *errstr,  	struct nhrp_registration *reg, *regn;  	int i; -	nhs->t_resolve = NULL;  	if (n < 0) {  		/* Failed, retry in a moment */  		thread_add_timer(master, nhrp_nhs_resolve, nhs, 5, diff --git a/nhrpd/nhrp_peer.c b/nhrpd/nhrp_peer.c index 5a7da703ac..030f4c0ff3 100644 --- a/nhrpd/nhrp_peer.c +++ b/nhrpd/nhrp_peer.c @@ -265,7 +265,6 @@ static int nhrp_peer_request_timeout(struct thread *t)  	struct interface *ifp = p->ifp;  	struct nhrp_interface *nifp = ifp->info; -	p->t_fallback = NULL;  	if (p->online)  		return 0; diff --git a/nhrpd/nhrp_shortcut.c b/nhrpd/nhrp_shortcut.c index 0905ceb72a..244273cd58 100644 --- a/nhrpd/nhrp_shortcut.c +++ b/nhrpd/nhrp_shortcut.c @@ -39,7 +39,6 @@ static int nhrp_shortcut_do_expire(struct thread *t)  {  	struct nhrp_shortcut *s = THREAD_ARG(t); -	s->t_timer = NULL;  	thread_add_timer(master, nhrp_shortcut_do_purge, s, s->holding_time / 3,  			 &s->t_timer);  	s->expiring = 1; diff --git a/nhrpd/vici.c b/nhrpd/vici.c index c21e01601c..8fce828663 100644 --- a/nhrpd/vici.c +++ b/nhrpd/vici.c @@ -361,7 +361,6 @@ static int vici_read(struct thread *t)  	struct zbuf *ibuf = &vici->ibuf;  	struct zbuf pktbuf; -	vici->t_read = NULL;  	if (zbuf_read(ibuf, vici->fd, (size_t)-1) < 0) {  		vici_connection_error(vici);  		return 0; @@ -392,7 +391,6 @@ static int vici_write(struct thread *t)  	struct vici_conn *vici = THREAD_ARG(t);  	int r; -	vici->t_write = NULL;  	r = zbufq_write(&vici->obuf, vici->fd);  	if (r > 0) {  		thread_add_write(master, vici_write, vici, vici->fd, @@ -509,7 +507,6 @@ static int vici_reconnect(struct thread *t)  	int fd;  	char *file_path; -	vici->t_reconnect = NULL;  	if (vici->fd >= 0)  		return 0;  | 
