diff options
Diffstat (limited to 'include/omc.h')
-rw-r--r-- | include/omc.h | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/include/omc.h b/include/omc.h index c5edef1..11252b1 100644 --- a/include/omc.h +++ b/include/omc.h @@ -35,9 +35,9 @@ #include "recipe.h" #include "relocation.h" -#define guard_runtime_free(X) if (X) { runtime_free(X); X = NULL; } -#define guard_strlist_free(X) if (X) { strlist_free(X); X = NULL; } -#define guard_free(X) if (X) { free(X); X = NULL; } +#define guard_runtime_free(X) do { if (X) { runtime_free(X); X = NULL; } } while (0) +#define guard_strlist_free(X) do { if (X) { strlist_free(X); X = NULL; } } while (0) +#define guard_free(X) do { if (X) { free(X); X = NULL; } } while (0) #define COE_CHECK_ABORT(COND, MSG) {\ if (COND) { \ |