]> git.puffer.fish Git - mirror/frr.git/commitdiff
lib: thread pointer is already null at this point
authorDonald Sharp <sharpd@nvidia.com>
Fri, 8 Jul 2022 20:14:13 +0000 (16:14 -0400)
committerDonald Sharp <sharpd@nvidia.com>
Tue, 19 Jul 2022 17:54:10 +0000 (13:54 -0400)
in agentx_events_update the timeout_thr is canceled
on line 88 just above.  This already sets the pointer
to NULL.  No need to do this again.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
lib/agentx.c

index 821c573fb279c7505c176580a1df822853660a85..e03e19aad5925496c2dab662c020549448181ef6 100644 (file)
@@ -118,7 +118,6 @@ static void agentx_events_update(void)
        snmp_select_info(&maxfd, &fds, &timeout, &block);
 
        if (!block) {
-               timeout_thr = NULL;
                thread_add_timer_tv(agentx_tm, agentx_timeout, NULL, &timeout,
                                    &timeout_thr);
        }