From 7f24b27652ee6fa84e38f181cea57f319af0c204 Mon Sep 17 00:00:00 2001 From: Sebastiano Tronto Date: Mon, 28 Jul 2025 13:52:00 +0200 Subject: Make failed assert exit immediately --- src/utils/dbg_log.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/utils/dbg_log.h') diff --git a/src/utils/dbg_log.h b/src/utils/dbg_log.h index e5b3e24..d737ff2 100644 --- a/src/utils/dbg_log.h +++ b/src/utils/dbg_log.h @@ -24,11 +24,11 @@ write_wrapper(void (*write)(const char *, void *), const char *str, ...) #define STATIC #define STATIC_INLINE #define DBG_WARN(condition, ...) if (!(condition)) LOG(__VA_ARGS__); -#define DBG_ASSERT(condition, retval, ...) \ - if (!(condition)) { LOG(__VA_ARGS__); return retval; } +#define DBG_ASSERT(condition, ...) \ + if (!(condition)) { LOG(__VA_ARGS__); exit(1); } #else #define STATIC static #define STATIC_INLINE static inline #define DBG_WARN(condition, ...) -#define DBG_ASSERT(condition, retval, ...) +#define DBG_ASSERT(condition, ...) #endif -- cgit v1.3