diff options
author | Joseph Hunkeler <jhunkeler@gmail.com> | 2023-12-10 01:10:52 -0500 |
---|---|---|
committer | Joseph Hunkeler <jhunkeler@gmail.com> | 2023-12-10 01:10:52 -0500 |
commit | cf83afb671e245adea8ea3b91d4e2fa52dae5fe3 (patch) | |
tree | bcd1d27b39171dfa97a7bf41d259fa43208bb8d5 | |
parent | 80a2bd684f77e553a8928286848c7c076808c271 (diff) | |
download | stasis-cf83afb671e245adea8ea3b91d4e2fa52dae5fe3.tar.gz |
Move guard_ macros to primary header
-rw-r--r-- | include/omc.h | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/include/omc.h b/include/omc.h index d798b33..245a572 100644 --- a/include/omc.h +++ b/include/omc.h @@ -21,6 +21,10 @@ #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 COE_CHECK_ABORT(COND, MSG) {\ if (COND) { \ msg(OMC_MSG_ERROR, MSG ": Aborting execution (--continue-on-error/-C is not enabled)\n"); \ |