From 9bf40160e911dd6c2affa856c375193ae0579947 Mon Sep 17 00:00:00 2001 From: "@syxhe" Date: Sat, 27 Dec 2025 23:10:06 -0600 Subject: Start working on cryptscan again --- src/shared.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'src/shared.c') diff --git a/src/shared.c b/src/shared.c index b6d27e4..1dd0309 100644 --- a/src/shared.c +++ b/src/shared.c @@ -29,8 +29,10 @@ //! Macro to exit on an alloc error instead of doing the terrible nested if statement that was being used previously #define XALLOC_EXIT(msg, ...) do { \ - if(___VXGG___VERBOSE_ERRORS___) error(EXIT_FAILURE, errno, (msg)__VA_ARGS__); \ - if(___VXGG___VXALLOC_EXIT_ON_ERROR___) exit(EXIT_FAILURE); \ + if(___VXGG___VXALLOC_EXIT_ON_ERROR___) { \ + if(___VXGG___VERBOSE_ERRORS___) error(EXIT_FAILURE, errno, (msg)__VA_ARGS__); \ + exit(EXIT_FAILURE); \ + } \ abort(); \ } while (0) @@ -102,6 +104,7 @@ int rwbuf(char **str, unsigned long int initsize, int fd) { ERR_rwbuf: if(___VXGG___VERBOSE_ERRORS___) { switch (eflag) { + case 0: break; case 1: WARN(errno, "Could not reallocate enough space for lstr",); break; case 2: WARN(errno, "Ran into a read() error",); break; case 3: WARN(errno, "Could not shrink lstr after reading buffer",); break; -- cgit v1.2.3