]> git.puffer.fish Git - mirror/frr.git/commitdiff
zebra: Do not explicitly set the thread pointer to NULL
authorDonatas Abraitis <donatas.abraitis@gmail.com>
Mon, 4 Oct 2021 16:23:55 +0000 (19:23 +0300)
committerDonatas Abraitis <donatas.abraitis@gmail.com>
Mon, 4 Oct 2021 16:23:55 +0000 (19:23 +0300)
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>
zebra/irdp_main.c
zebra/irdp_packet.c
zebra/zebra_netns_notify.c

index 66a6bd0545273ec043cc7753a1133611b7833e07..f141b727194ca96fe1513090857985d196509cf7 100644 (file)
@@ -112,7 +112,6 @@ int irdp_sock_init(void)
                return ret;
        };
 
-       t_irdp_raw = NULL;
        thread_add_read(zrouter.master, irdp_read_raw, NULL, sock, &t_irdp_raw);
 
        return sock;
index 7d67c42a79e9b06f843b7ca9f4f7bf6af164ebf8..5601b13a92ad6d4991a5897e3d7087378e1e1cb2 100644 (file)
@@ -233,7 +233,6 @@ int irdp_read_raw(struct thread *r)
        int ret, ifindex = 0;
 
        int irdp_sock = THREAD_FD(r);
-       t_irdp_raw = NULL;
        thread_add_read(zrouter.master, irdp_read_raw, NULL, irdp_sock,
                        &t_irdp_raw);
 
index 054015846f478dadb460262cc4e3f65470cea34c..61f97ce6a948e061f51356190d9f5f982fb36bc0 100644 (file)
@@ -346,7 +346,6 @@ void zebra_ns_notify_init(void)
 {
        int fd_monitor;
 
-       zebra_netns_notify_current = NULL;
        fd_monitor = inotify_init();
        if (fd_monitor < 0) {
                flog_err_sys(