diff options
| author | @syxhe <https://t.me/syxhe> | 2025-11-10 16:09:10 -0600 |
|---|---|---|
| committer | @syxhe <https://t.me/syxhe> | 2025-11-10 16:09:10 -0600 |
| commit | c8ab26e9f5aa398a208fcac3d8d11335f6c72632 (patch) | |
| tree | 2dc2c0f18e98b71c02991ea5511cdcb0039e346b /src/shared.c | |
| parent | 0c541f74d346625618dc3ea8974bfb2cf042c000 (diff) | |
Diffstat (limited to 'src/shared.c')
| -rw-r--r-- | src/shared.c | 11 |
1 files changed, 4 insertions, 7 deletions
diff --git a/src/shared.c b/src/shared.c index 2397bd6..b6d27e4 100644 --- a/src/shared.c +++ b/src/shared.c | |||
| @@ -28,13 +28,10 @@ | |||
| 28 | #define ___VXGG___VERBOSE_ERRORS___ 1 | 28 | #define ___VXGG___VERBOSE_ERRORS___ 1 |
| 29 | 29 | ||
| 30 | //! Macro to exit on an alloc error instead of doing the terrible nested if statement that was being used previously | 30 | //! Macro to exit on an alloc error instead of doing the terrible nested if statement that was being used previously |
| 31 | #define XALLOC_EXIT(msg, ...) do {\ | 31 | #define XALLOC_EXIT(msg, ...) do { \ |
| 32 | if(!___VXGG___VXALLOC_EXIT_ON_ERROR___)\ | 32 | if(___VXGG___VERBOSE_ERRORS___) error(EXIT_FAILURE, errno, (msg)__VA_ARGS__); \ |
| 33 | abort();\ | 33 | if(___VXGG___VXALLOC_EXIT_ON_ERROR___) exit(EXIT_FAILURE); \ |
| 34 | if(!___VXGG___VERBOSE_ERRORS___)\ | 34 | abort(); \ |
| 35 | exit(EXIT_FAILURE);\ | ||
| 36 | error(EXIT_FAILURE, errno, (msg)__VA_ARGS__);\ | ||
| 37 | exit(EXIT_FAILURE); /* Makes gcc happy */\ | ||
| 38 | } while (0) | 35 | } while (0) |
| 39 | 36 | ||
| 40 | //! Error macro that gcc will not complain about | 37 | //! Error macro that gcc will not complain about |
