diff options
Diffstat (limited to 'ospfd')
-rw-r--r-- | ospfd/ChangeLog | 5 | ||||
-rw-r--r-- | ospfd/ospf_ism.h | 12 |
2 files changed, 12 insertions, 5 deletions
diff --git a/ospfd/ChangeLog b/ospfd/ChangeLog index 825b92c1c..b33ca4382 100644 --- a/ospfd/ChangeLog +++ b/ospfd/ChangeLog @@ -1,3 +1,8 @@ +2005-11-16 Andrew J. Schorr <ajschorr@alumni.princeton.edu> + + * ospf_ism.h: (OSPF_ISM_TIMER_OFF) Improve macro syntax by enclosing + in 'do {...} while(0)'. + 2005-11-14 Paul Jakma <paul.jakma@sun.com> * ospfd.c: (ospf_new) stub-shutdown should just default to 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) \ |