diff options
Diffstat (limited to 'ospfd/ospf_ism.h')
-rw-r--r-- | ospfd/ospf_ism.h | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/ospfd/ospf_ism.h b/ospfd/ospf_ism.h index c714a15c7..f0357a482 100644 --- a/ospfd/ospf_ism.h +++ b/ospfd/ospf_ism.h @@ -90,11 +90,13 @@ /* Macro for OSPF ISM timer turn off. */ #define OSPF_ISM_TIMER_OFF(X) \ - if (X) \ - { \ - thread_cancel (X); \ - (X) = NULL; \ - } + do { \ + if (X) \ + { \ + thread_cancel (X); \ + (X) = NULL; \ + } \ + } while (0) /* Macro for OSPF schedule event. */ #define OSPF_ISM_EVENT_SCHEDULE(I,E) \ |