summaryrefslogtreecommitdiff
path: root/ldpd/ldpe.c
diff options
context:
space:
mode:
authorDonatas Abraitis <donatas.abraitis@gmail.com>2021-10-04 19:25:18 +0300
committerDonatas Abraitis <donatas.abraitis@gmail.com>2021-10-04 19:25:18 +0300
commitdc4a902689e46717e2f7c34d3546e7b5b78cb3d1 (patch)
treeded05cd7901bcf6ef934decfa27fab4884b79002 /ldpd/ldpe.c
parentc34d552dd5fe8a6821ec5efee2eb463fe3108424 (diff)
ldpd: 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 'ldpd/ldpe.c')
-rw-r--r--ldpd/ldpe.c6
1 files changed, 0 insertions, 6 deletions
diff --git a/ldpd/ldpe.c b/ldpd/ldpe.c
index 428d2ab7b4..fff7ee7c67 100644
--- a/ldpd/ldpe.c
+++ b/ldpd/ldpe.c
@@ -122,7 +122,6 @@ ldpe(void)
fatal(NULL);
imsg_init(&iev_main->ibuf, LDPD_FD_ASYNC);
iev_main->handler_read = ldpe_dispatch_main;
- iev_main->ev_read = NULL;
thread_add_read(master, iev_main->handler_read, iev_main, iev_main->ibuf.fd,
&iev_main->ev_read);
iev_main->handler_write = ldp_write_handler;
@@ -149,7 +148,6 @@ ldpe_init(struct ldpd_init *init)
/* This socket must be open before dropping privileges. */
global.pfkeysock = pfkey_init();
if (sysdep.no_pfkey == 0) {
- pfkey_ev = NULL;
thread_add_read(master, ldpe_dispatch_pfkey, NULL, global.pfkeysock,
&pfkey_ev);
}
@@ -377,7 +375,6 @@ ldpe_dispatch_main(struct thread *thread)
fatal(NULL);
imsg_init(&iev_lde->ibuf, fd);
iev_lde->handler_read = ldpe_dispatch_lde;
- iev_lde->ev_read = NULL;
thread_add_read(master, iev_lde->handler_read, iev_lde, iev_lde->ibuf.fd,
&iev_lde->ev_read);
iev_lde->handler_write = ldp_write_handler;
@@ -784,7 +781,6 @@ ldpe_dispatch_pfkey(struct thread *thread)
{
int fd = THREAD_FD(thread);
- pfkey_ev = NULL;
thread_add_read(master, ldpe_dispatch_pfkey, NULL, global.pfkeysock,
&pfkey_ev);
@@ -805,13 +801,11 @@ ldpe_setup_sockets(int af, int disc_socket, int edisc_socket,
/* discovery socket */
af_global->ldp_disc_socket = disc_socket;
- af_global->disc_ev = NULL;
thread_add_read(master, disc_recv_packet, &af_global->disc_ev, af_global->ldp_disc_socket,
&af_global->disc_ev);
/* extended discovery socket */
af_global->ldp_edisc_socket = edisc_socket;
- af_global->edisc_ev = NULL;
thread_add_read(master, disc_recv_packet, &af_global->edisc_ev, af_global->ldp_edisc_socket,
&af_global->edisc_ev);