diff --git a/src/common.h b/src/common.h
index a5e2167b6c1e3565a96d2e399aee0616923f3133..119cee6dcc2952cb640df0af01d4a63bed5420e2 100644 (file)
--- a/src/common.h
+++ b/src/common.h
#endif
#define sfree(ptr) \
- if((ptr) != NULL) { \
- free(ptr); \
- } \
- (ptr) = NULL
+ do { \
+ if((ptr) != NULL) { \
+ free(ptr); \
+ } \
+ (ptr) = NULL; \
+ } while (0)
#define STATIC_ARRAY_SIZE(a) (sizeof (a) / sizeof (*(a)))