diff options
Diffstat (limited to 'src/global.h')
-rw-r--r-- | src/global.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/src/global.h b/src/global.h index 6e4e866..f2cab07 100644 --- a/src/global.h +++ b/src/global.h @@ -16,6 +16,7 @@ extern int verbose; #define ERROR_STR(str, ...) do { errno = 0; ERROR_INFO_STR(str, __VA_ARGS__); } while (0) #define ERROR_INFO(...) do { ERROR_INFO_STR("", __VA_ARGS__); } while (0) #define ERROR(...) do { ERROR_STR("", __VA_ARGS__); } while (0) +#define ERROR_RETURN(str, ...) do { ERROR("%s", str); return __VA_ARGS__; } while (0) #define ALLOC_ERROR() do { ERROR("Cannot allocate memory"); } while (0) #define ALLOC_ERROR_RETURN(...) do { ALLOC_ERROR(); return __VA_ARGS__; } while (0) |