include/assert: fix nxstyle
Signed-off-by: yinshengkai <yinshengkai@xiaomi.com>
This commit is contained in:
parent
216483f96b
commit
926bfe5818
@ -50,11 +50,37 @@
|
|||||||
#define PANIC() __assert(__FILE__, __LINE__, "panic")
|
#define PANIC() __assert(__FILE__, __LINE__, "panic")
|
||||||
|
|
||||||
#ifdef CONFIG_DEBUG_ASSERTIONS_EXPRESSION
|
#ifdef CONFIG_DEBUG_ASSERTIONS_EXPRESSION
|
||||||
#define ASSERT(f) do { if (predict_false(!(f))) __assert(__FILE__, __LINE__, #f); } while (0)
|
# define ASSERT(f) \
|
||||||
#define VERIFY(f) do { if (predict_false((f) < 0)) __assert(__FILE__, __LINE__, #f); } while (0)
|
do \
|
||||||
|
{ \
|
||||||
|
if (predict_false(!(f))) \
|
||||||
|
__assert(__FILE__, __LINE__, #f); \
|
||||||
|
} \
|
||||||
|
while (0)
|
||||||
|
|
||||||
|
# define VERIFY(f) \
|
||||||
|
do \
|
||||||
|
{ \
|
||||||
|
if (predict_false((f) < 0)) \
|
||||||
|
__assert(__FILE__, __LINE__, #f); \
|
||||||
|
} \
|
||||||
|
while (0)
|
||||||
#else
|
#else
|
||||||
#define ASSERT(f) do { if (predict_false(!(f))) __assert(__FILE__, __LINE__, NULL); } while (0)
|
# define ASSERT(f) \
|
||||||
#define VERIFY(f) do { if (predict_false((f) < 0)) __assert(__FILE__, __LINE__, NULL); } while (0)
|
do \
|
||||||
|
{ \
|
||||||
|
if (predict_false(!(f))) \
|
||||||
|
__assert(__FILE__, __LINE__, NULL); \
|
||||||
|
} \
|
||||||
|
while (0)
|
||||||
|
|
||||||
|
# define VERIFY(f) \
|
||||||
|
do \
|
||||||
|
{ \
|
||||||
|
if (predict_false((f) < 0)) \
|
||||||
|
__assert(__FILE__, __LINE__, NULL); \
|
||||||
|
} \
|
||||||
|
while (0)
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef CONFIG_DEBUG_ASSERTIONS
|
#ifdef CONFIG_DEBUG_ASSERTIONS
|
||||||
|
Loading…
x
Reference in New Issue
Block a user