mirror of
https://github.com/tailix/libkernaux.git
synced 2025-02-24 15:55:41 -05:00
Turn assertion into expression instead of statement
This commit is contained in:
parent
fc4fbd64b4
commit
c397165dd4
1 changed files with 1 additions and 1 deletions
|
@ -6,7 +6,7 @@ extern "C" {
|
|||
#endif
|
||||
|
||||
#define kernaux_assert(cond) \
|
||||
{ if (!(cond)) kernaux_assert_do(__FILE__, __LINE__, #cond); }
|
||||
((cond) ? (void)0 : kernaux_assert_do(__FILE__, __LINE__, #cond))
|
||||
|
||||
void kernaux_assert_do(const char *file, int line, const char *str);
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue