summaryrefslogtreecommitdiffstats
path: root/pimd/pim_bsm.c
diff options
context:
space:
mode:
authorDonald Sharp <sharpd@nvidia.com>2020-10-12 14:35:18 +0200
committerDonald Sharp <sharpd@nvidia.com>2020-10-12 14:35:18 +0200
commit28ef0ee121aa93399d8684a59d6ca66ee07ade84 (patch)
tree0ed63f8466ec87119c32a0af40e490aa89c6622d /pimd/pim_bsm.c
parentMerge pull request #7222 from idryzhov/fix-debug (diff)
downloadfrr-28ef0ee121aa93399d8684a59d6ca66ee07ade84.tar.xz
frr-28ef0ee121aa93399d8684a59d6ca66ee07ade84.zip
*: Use proper semantics for turning off thread
We have this pattern in the code base: if (thread) THREAD_OFF(thread); If we look at THREAD_OFF we check to see if thread is non-null too. So we have a double check. This is unnecessary. Convert to just using THREAD_OFF Signed-off-by: Donald Sharp <sharpd@nvidia.com>
Diffstat (limited to 'pimd/pim_bsm.c')
-rw-r--r--pimd/pim_bsm.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/pimd/pim_bsm.c b/pimd/pim_bsm.c
index 1c9005588..f542b2eaf 100644
--- a/pimd/pim_bsm.c
+++ b/pimd/pim_bsm.c
@@ -117,8 +117,7 @@ static int pim_g2rp_list_compare(struct bsm_rpinfo *node1,
static void pim_free_bsrp_node(struct bsm_rpinfo *bsrp_info)
{
- if (bsrp_info->g2rp_timer)
- THREAD_OFF(bsrp_info->g2rp_timer);
+ THREAD_OFF(bsrp_info->g2rp_timer);
XFREE(MTYPE_PIM_BSRP_NODE, bsrp_info);
}