summaryrefslogtreecommitdiff
path: root/ospfd
diff options
context:
space:
mode:
Diffstat (limited to 'ospfd')
-rw-r--r--ospfd/ChangeLog5
-rw-r--r--ospfd/ospf_ism.h12
2 files changed, 12 insertions, 5 deletions
diff --git a/ospfd/ChangeLog b/ospfd/ChangeLog
index 825b92c1..b33ca438 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 c714a15c..f0357a48 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) \