kernel: Using boolean types for boolean constants

Make boolean expressions use boolean types.

MISRA-C rule 14.4

Signed-off-by: Flavio Ceolin <flavio.ceolin@intel.com>
This commit is contained in:
Flavio Ceolin 2018-09-18 12:32:27 -07:00 committed by Anas Nashif
commit 6fdc56d286
19 changed files with 64 additions and 46 deletions

View file

@ -17,6 +17,8 @@
extern "C" {
#endif
#include <stdbool.h>
/**
* @brief Networking
* @defgroup networking Networking
@ -53,12 +55,12 @@ extern "C" {
#define NET_ASSERT(cond) do { \
if (!(cond)) { \
NET_ERR("{assert: '" #cond "' failed}"); \
} } while (0)
} } while (false)
#define NET_ASSERT_INFO(cond, fmt, ...) do { \
if (!(cond)) { \
NET_ERR("{assert: '" #cond "' failed} " fmt, \
##__VA_ARGS__); \
} } while (0)
} } while (false)
#else /* NET_LOG_ENABLED */
#define NET_DBG(...)
#define NET_ERR(...)