keep kernel panics on failed assertion with NDEBUG

This commit is contained in:
Benji Dial 2025-12-31 22:06:18 -05:00
parent a3575b8997
commit 42fe995724

View file

@ -22,12 +22,8 @@
#define panic(message) panic_core(__FILE__, __func__, __LINE__, message); #define panic(message) panic_core(__FILE__, __func__, __LINE__, message);
#ifdef NDEBUG
#define assert(condition) ((void)0)
#else
#define assert(condition) \ #define assert(condition) \
{ \ { \
if (!(condition)) \ if (!(condition)) \
panic("assertion failed: " #condition) \ panic("assertion failed: " #condition) \
} }
#endif