diff options
| author | Donald Sharp <sharpd@nvidia.com> | 2020-10-12 08:35:18 -0400 |
|---|---|---|
| committer | Donald Sharp <sharpd@nvidia.com> | 2020-10-12 08:35:18 -0400 |
| commit | 28ef0ee121aa93399d8684a59d6ca66ee07ade84 (patch) | |
| tree | 0ed63f8466ec87119c32a0af40e490aa89c6622d /bgpd/bgp_fsm.h | |
| parent | 8b6b6b694d7c5ae8193e0c9a3907b9143df44a07 (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 'bgpd/bgp_fsm.h')
| -rw-r--r-- | bgpd/bgp_fsm.h | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/bgpd/bgp_fsm.h b/bgpd/bgp_fsm.h index 85c0eccc26..aa98515c3f 100644 --- a/bgpd/bgp_fsm.h +++ b/bgpd/bgp_fsm.h @@ -31,8 +31,7 @@ #define BGP_TIMER_OFF(T) \ do { \ - if (T) \ - THREAD_TIMER_OFF(T); \ + THREAD_TIMER_OFF(T); \ } while (0) #define BGP_EVENT_ADD(P, E) \ |
