summaryrefslogtreecommitdiff
path: root/src/shared/include/assert.h
blob: 7520aa93ed3e14d7b38437c9c20af684070d5128 (plain)
1
2
3
4
5
6
7
#ifdef NDEBUG
#define assert(stmt) do {} while (0)
#else
#define assert(stmt) do { if (!(stmt)) __badassert(__func__, __FILE__, __LINE__); } while (0)
#endif

_Noreturn void __badassert(const char *func, const char *file, int line);