diff options
author | Donatas Abraitis <donatas.abraitis@gmail.com> | 2021-10-04 18:26:01 +0200 |
---|---|---|
committer | Donatas Abraitis <donatas.abraitis@gmail.com> | 2021-10-04 18:29:06 +0200 |
commit | f2b64253b8b9fd5029066c5d3b02392f0af1f339 (patch) | |
tree | 1cff8942374b4500e2eaeeb00acc35f546062182 /ospf6d | |
parent | nhrpd: Do not explicitly set the thread pointer to NULL (diff) | |
download | frr-f2b64253b8b9fd5029066c5d3b02392f0af1f339.tar.xz frr-f2b64253b8b9fd5029066c5d3b02392f0af1f339.zip |
ospf6d: 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 'ospf6d')
-rw-r--r-- | ospf6d/ospf6_asbr.c | 1 | ||||
-rw-r--r-- | ospf6d/ospf6_flood.c | 3 | ||||
-rw-r--r-- | ospf6d/ospf6_interface.c | 1 | ||||
-rw-r--r-- | ospf6d/ospf6_lsa.c | 1 | ||||
-rw-r--r-- | ospf6d/ospf6_message.c | 6 | ||||
-rw-r--r-- | ospf6d/ospf6_neighbor.c | 4 |
6 files changed, 0 insertions, 16 deletions
diff --git a/ospf6d/ospf6_asbr.c b/ospf6d/ospf6_asbr.c index df40c608a..3a6078ff0 100644 --- a/ospf6d/ospf6_asbr.c +++ b/ospf6d/ospf6_asbr.c @@ -1139,7 +1139,6 @@ void ospf6_asbr_distribute_list_update(struct ospf6 *ospf6, if (IS_OSPF6_DEBUG_ASBR) zlog_debug("%s: trigger redistribute reset thread", __func__); - ospf6->t_distribute_update = NULL; thread_add_timer_msec(master, ospf6_asbr_routemap_update_timer, ospf6, OSPF_MIN_LS_INTERVAL, &ospf6->t_distribute_update); diff --git a/ospf6d/ospf6_flood.c b/ospf6d/ospf6_flood.c index 186eac35a..6ad2a70f0 100644 --- a/ospf6d/ospf6_flood.c +++ b/ospf6d/ospf6_flood.c @@ -288,7 +288,6 @@ void ospf6_install_lsa(struct ospf6_lsa *lsa) monotime(&now); if (!OSPF6_LSA_IS_MAXAGE(lsa)) { - lsa->expire = NULL; thread_add_timer(master, ospf6_lsa_expire, lsa, OSPF_LSA_MAXAGE + lsa->birth.tv_sec - now.tv_sec, @@ -547,7 +546,6 @@ void ospf6_flood_interface(struct ospf6_neighbor *from, struct ospf6_lsa *lsa, /* reschedule retransmissions to all neighbors */ for (ALL_LIST_ELEMENTS(oi->neighbor_list, node, nnode, on)) { THREAD_OFF(on->thread_send_lsupdate); - on->thread_send_lsupdate = NULL; thread_add_event(master, ospf6_lsupdate_send_neighbor, on, 0, &on->thread_send_lsupdate); } @@ -1113,7 +1111,6 @@ void ospf6_receive_lsa(struct ospf6_neighbor *from, "Newer instance of the self-originated LSA"); zlog_debug("Schedule reorigination"); } - new->refresh = NULL; thread_add_event(master, ospf6_lsa_refresh, new, 0, &new->refresh); } diff --git a/ospf6d/ospf6_interface.c b/ospf6d/ospf6_interface.c index b63a3c02d..a3eb1445f 100644 --- a/ospf6d/ospf6_interface.c +++ b/ospf6d/ospf6_interface.c @@ -819,7 +819,6 @@ int interface_up(struct thread *thread) /* Schedule Hello */ if (!CHECK_FLAG(oi->flag, OSPF6_INTERFACE_PASSIVE) && !if_is_loopback_or_vrf(oi->interface)) { - oi->thread_send_hello = NULL; thread_add_event(master, ospf6_hello_send, oi, 0, &oi->thread_send_hello); } diff --git a/ospf6d/ospf6_lsa.c b/ospf6d/ospf6_lsa.c index ac07704d2..f406e828e 100644 --- a/ospf6d/ospf6_lsa.c +++ b/ospf6d/ospf6_lsa.c @@ -891,7 +891,6 @@ int ospf6_lsa_refresh(struct thread *thread) new = ospf6_lsa_create(self->header); new->lsdb = old->lsdb; - new->refresh = NULL; thread_add_timer(master, ospf6_lsa_refresh, new, OSPF_LS_REFRESH_TIME, &new->refresh); diff --git a/ospf6d/ospf6_message.c b/ospf6d/ospf6_message.c index 64de9bae4..56dcbb69c 100644 --- a/ospf6d/ospf6_message.c +++ b/ospf6d/ospf6_message.c @@ -775,7 +775,6 @@ static void ospf6_dbdesc_recv_master(struct ospf6_header *oh, && !CHECK_FLAG(on->dbdesc_bits, OSPF6_DBDESC_MBIT)) thread_add_event(master, exchange_done, on, 0, NULL); else { - on->thread_send_dbdesc = NULL; thread_add_event(master, ospf6_dbdesc_send_newone, on, 0, &on->thread_send_dbdesc); } @@ -856,7 +855,6 @@ static void ospf6_dbdesc_recv_slave(struct ospf6_header *oh, zlog_debug( "Duplicated dbdesc causes retransmit"); THREAD_OFF(on->thread_send_dbdesc); - on->thread_send_dbdesc = NULL; thread_add_event(master, ospf6_dbdesc_send, on, 0, &on->thread_send_dbdesc); return; @@ -2399,7 +2397,6 @@ int ospf6_lsreq_send(struct thread *thread) /* set next thread */ if (on->request_list->count != 0) { - on->thread_send_lsreq = NULL; thread_add_timer(master, ospf6_lsreq_send, on, on->ospf6_if->rxmt_interval, &on->thread_send_lsreq); @@ -2585,11 +2582,9 @@ int ospf6_lsupdate_send_neighbor(struct thread *thread) ospf6_packet_free(op); if (on->lsupdate_list->count != 0) { - on->thread_send_lsupdate = NULL; thread_add_event(master, ospf6_lsupdate_send_neighbor, on, 0, &on->thread_send_lsupdate); } else if (on->retrans_list->count != 0) { - on->thread_send_lsupdate = NULL; thread_add_timer(master, ospf6_lsupdate_send_neighbor, on, on->ospf6_if->rxmt_interval, &on->thread_send_lsupdate); @@ -2703,7 +2698,6 @@ int ospf6_lsupdate_send_interface(struct thread *thread) ospf6_packet_free(op); if (oi->lsupdate_list->count > 0) { - oi->thread_send_lsupdate = NULL; thread_add_event(master, ospf6_lsupdate_send_interface, oi, 0, &oi->thread_send_lsupdate); } diff --git a/ospf6d/ospf6_neighbor.c b/ospf6d/ospf6_neighbor.c index 35fbd3991..6f2795a56 100644 --- a/ospf6d/ospf6_neighbor.c +++ b/ospf6d/ospf6_neighbor.c @@ -273,7 +273,6 @@ int hello_received(struct thread *thread) /* reset Inactivity Timer */ THREAD_OFF(on->inactivity_timer); - on->inactivity_timer = NULL; thread_add_timer(master, inactivity_timer, on, on->ospf6_if->dead_interval, &on->inactivity_timer); @@ -312,7 +311,6 @@ int twoway_received(struct thread *thread) SET_FLAG(on->dbdesc_bits, OSPF6_DBDESC_IBIT); THREAD_OFF(on->thread_send_dbdesc); - on->thread_send_dbdesc = NULL; thread_add_event(master, ospf6_dbdesc_send, on, 0, &on->thread_send_dbdesc); @@ -438,7 +436,6 @@ void ospf6_check_nbr_loading(struct ospf6_neighbor *on) else if (on->last_ls_req == NULL) { if (on->thread_send_lsreq != NULL) THREAD_OFF(on->thread_send_lsreq); - on->thread_send_lsreq = NULL; thread_add_event(master, ospf6_lsreq_send, on, 0, &on->thread_send_lsreq); } @@ -620,7 +617,6 @@ int inactivity_timer(struct thread *thread) if (IS_OSPF6_DEBUG_NEIGHBOR(EVENT)) zlog_debug("Neighbor Event %s: *InactivityTimer*", on->name); - on->inactivity_timer = NULL; on->drouter = on->prev_drouter = 0; on->bdrouter = on->prev_bdrouter = 0; |