summaryrefslogtreecommitdiff
path: root/eigrpd
diff options
context:
space:
mode:
authorDonald Sharp <sharpd@nvidia.com>2020-10-12 08:35:18 -0400
committerDonald Sharp <sharpd@nvidia.com>2020-10-12 08:35:18 -0400
commit28ef0ee121aa93399d8684a59d6ca66ee07ade84 (patch)
tree0ed63f8466ec87119c32a0af40e490aa89c6622d /eigrpd
parent8b6b6b694d7c5ae8193e0c9a3907b9143df44a07 (diff)
*: 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 'eigrpd')
-rw-r--r--eigrpd/eigrp_interface.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/eigrpd/eigrp_interface.c b/eigrpd/eigrp_interface.c
index 9ef4e86237..2f3f347423 100644
--- a/eigrpd/eigrp_interface.c
+++ b/eigrpd/eigrp_interface.c
@@ -331,8 +331,7 @@ int eigrp_if_down(struct eigrp_interface *ei)
return 0;
/* Shutdown packet reception and sending */
- if (ei->t_hello)
- THREAD_OFF(ei->t_hello);
+ THREAD_OFF(ei->t_hello);
eigrp_if_stream_unset(ei);