projects
/
collectd.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
| inline |
side by side
Merge branch 'collectd-4.4'
[collectd.git]
/
src
/
common.h
diff --git
a/src/common.h
b/src/common.h
index
a5e2167
..
119cee6
100644
(file)
--- a/
src/common.h
+++ b/
src/common.h
@@
-31,10
+31,12
@@
#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)))