net: core: Change NET_ASSERT*() to use zephyr standard assert
Avoid dependency to logging subsystem in NET_ASSERT*(), so use standard Zephyr asserts instead. Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
This commit is contained in:
parent
301d342571
commit
a26a6ae6a7
1 changed files with 4 additions and 9 deletions
|
@ -47,15 +47,10 @@ extern "C" {
|
|||
#define NET_WARN(fmt, ...) LOG_WRN(fmt, ##__VA_ARGS__)
|
||||
#define NET_INFO(fmt, ...) LOG_INF(fmt, ##__VA_ARGS__)
|
||||
|
||||
#define NET_ASSERT(cond) do { \
|
||||
if (!(cond)) { \
|
||||
NET_ERR("{assert: '" #cond "' failed}"); \
|
||||
} } while (false)
|
||||
#define NET_ASSERT_INFO(cond, fmt, ...) do { \
|
||||
if (!(cond)) { \
|
||||
NET_ERR("{assert: '" #cond "' failed} " fmt, \
|
||||
##__VA_ARGS__); \
|
||||
} } while (false)
|
||||
#include <misc/__assert.h>
|
||||
|
||||
#define NET_ASSERT(cond) __ASSERT_NO_MSG(cond)
|
||||
#define NET_ASSERT_INFO(cond, fmt, ...) __ASSERT(cond, fmt, ##__VA_ARGS__)
|
||||
|
||||
#include <kernel.h>
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue