From: Donatas Abraitis Date: Thu, 7 Oct 2021 09:25:59 +0000 (+0300) Subject: ospfd: Do not explicitly set the thread pointer to NULL X-Git-Tag: base_8.2~347^2~2 X-Git-Url: https://git.puffer.fish/?a=commitdiff_plain;h=30634856b419abac5ac65b7e0269d8d61b7b00a2;p=matthieu%2Ffrr.git ospfd: 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 --- diff --git a/ospfd/ospf_opaque.c b/ospfd/ospf_opaque.c index 9ec2ed0aa8..394c3142eb 100644 --- a/ospfd/ospf_opaque.c +++ b/ospfd/ospf_opaque.c @@ -578,7 +578,6 @@ register_opaque_info_per_type(struct ospf_opaque_functab *functab, oipt->lsa_type = new->data->type; oipt->opaque_type = GET_OPAQUE_TYPE(ntohl(new->data->id.s_addr)); oipt->status = PROC_NORMAL; - oipt->t_opaque_lsa_self = NULL; oipt->functab = functab; functab->oipt = oipt; oipt->id_list = list_new(); @@ -703,7 +702,6 @@ register_opaque_info_per_id(struct opaque_info_per_type *oipt, sizeof(struct opaque_info_per_id)); oipi->opaque_id = GET_OPAQUE_ID(ntohl(new->data->id.s_addr)); - oipi->t_opaque_lsa_self = NULL; oipi->opqctl_type = oipt; oipi->lsa = ospf_lsa_lock(new); @@ -1845,7 +1843,6 @@ static int ospf_opaque_type9_lsa_reoriginate_timer(struct thread *t) int rc = -1; oipt = THREAD_ARG(t); - oipt->t_opaque_lsa_self = NULL; if ((functab = oipt->functab) == NULL || functab->lsa_originator == NULL) { @@ -1897,7 +1894,6 @@ static int ospf_opaque_type10_lsa_reoriginate_timer(struct thread *t) int n, rc = -1; oipt = THREAD_ARG(t); - oipt->t_opaque_lsa_self = NULL; if ((functab = oipt->functab) == NULL || functab->lsa_originator == NULL) { @@ -1951,7 +1947,6 @@ static int ospf_opaque_type11_lsa_reoriginate_timer(struct thread *t) int rc = -1; oipt = THREAD_ARG(t); - oipt->t_opaque_lsa_self = NULL; if ((functab = oipt->functab) == NULL || functab->lsa_originator == NULL) { @@ -2067,7 +2062,6 @@ static int ospf_opaque_lsa_refresh_timer(struct thread *t) zlog_debug("Timer[Opaque-LSA]: (Opaque-LSA Refresh expire)"); oipi = THREAD_ARG(t); - oipi->t_opaque_lsa_self = NULL; if ((lsa = oipi->lsa) != NULL) if ((functab = oipi->opqctl_type->functab) != NULL)