diff --git a/include/sys/__assert.h b/include/sys/__assert.h index 918b4ca8a21..1b28dcecc4f 100644 --- a/include/sys/__assert.h +++ b/include/sys/__assert.h @@ -32,6 +32,12 @@ #define __ASSERT_COND_INFO(test) Z_STRINGIFY(test) #endif /* CONFIG_ASSERT_NO_COND_INFO */ +#define __ASSERT_LOC(test) \ + printk("ASSERTION FAIL [%s] @ %s:%d\n", \ + __ASSERT_COND_INFO(test), \ + __ASSERT_FILE_INFO, \ + __LINE__) \ + #ifdef __ASSERT_ON #if (__ASSERT_ON < 0) || (__ASSERT_ON > 2) #error "Invalid __ASSERT() level: must be between 0 and 2" @@ -51,12 +57,6 @@ void assert_post_action(const char *file, unsigned int line); } #endif -#define __ASSERT_LOC(test) \ - printk("ASSERTION FAIL [%s] @ %s:%d\n", \ - __ASSERT_COND_INFO(test), \ - __ASSERT_FILE_INFO, \ - __LINE__) \ - #define __ASSERT_NO_MSG(test) \ do { \ if (!(test)) { \