aboutsummaryrefslogtreecommitdiff
path: root/src/utils/dbg_log.h
diff options
context:
space:
mode:
authorSebastiano Tronto <sebastiano@tronto.net>2025-07-28 13:52:00 +0200
committerSebastiano Tronto <sebastiano@tronto.net>2025-07-28 13:52:00 +0200
commit7f24b27652ee6fa84e38f181cea57f319af0c204 (patch)
tree269b15baf20c2ae4ed3bb1fdb052340311aa1981 /src/utils/dbg_log.h
parent9b248f3b46d5dc0e9522ed264ef71e422a5bc5a5 (diff)
downloadnissy-core-7f24b27652ee6fa84e38f181cea57f319af0c204.tar.gz
nissy-core-7f24b27652ee6fa84e38f181cea57f319af0c204.zip
Make failed assert exit immediately
Diffstat (limited to 'src/utils/dbg_log.h')
-rw-r--r--src/utils/dbg_log.h6
1 files changed, 3 insertions, 3 deletions
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, ...)
24#define STATIC 24#define STATIC
25#define STATIC_INLINE 25#define STATIC_INLINE
26#define DBG_WARN(condition, ...) if (!(condition)) LOG(__VA_ARGS__); 26#define DBG_WARN(condition, ...) if (!(condition)) LOG(__VA_ARGS__);
27#define DBG_ASSERT(condition, retval, ...) \ 27#define DBG_ASSERT(condition, ...) \
28 if (!(condition)) { LOG(__VA_ARGS__); return retval; } 28 if (!(condition)) { LOG(__VA_ARGS__); exit(1); }
29#else 29#else
30#define STATIC static 30#define STATIC static
31#define STATIC_INLINE static inline 31#define STATIC_INLINE static inline
32#define DBG_WARN(condition, ...) 32#define DBG_WARN(condition, ...)
33#define DBG_ASSERT(condition, retval, ...) 33#define DBG_ASSERT(condition, ...)
34#endif 34#endif

Generated with cgit - Back to sebastiano.tronto.net