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

@ -12,11 +12,13 @@
#ifndef ZEPHYR_INCLUDE_DEBUG_OBJECT_TRACING_COMMON_H_
#define ZEPHYR_INCLUDE_DEBUG_OBJECT_TRACING_COMMON_H_
#include <stdbool.h>
#ifndef CONFIG_OBJECT_TRACING
#define SYS_TRACING_OBJ_INIT(name, obj) do { } while ((0))
#define SYS_TRACING_OBJ_INIT_DLL(name, obj) do { } while ((0))
#define SYS_TRACING_OBJ_REMOVE_DLL(name, obj) do { } while ((0))
#define SYS_TRACING_OBJ_INIT(name, obj) do { } while (false)
#define SYS_TRACING_OBJ_INIT_DLL(name, obj) do { } while (false)
#define SYS_TRACING_OBJ_REMOVE_DLL(name, obj) do { } while (false)
#else
@ -40,7 +42,7 @@
_trace_list_ ## name = obj; \
irq_unlock(key); \
} \
while (0)
while (false)
/**
* @def SYS_TRACING_OBJ_INIT_DLL
@ -67,7 +69,7 @@
_trace_list_ ## name = obj; \
irq_unlock(key); \
} \
while (0)
while (false)
/**
* @def SYS_TRACING_OBJ_REMOVE_DLL
@ -95,7 +97,7 @@
} \
irq_unlock(key); \
} \
while (0)
while (false)
#endif /*CONFIG_OBJECT_TRACING*/
#endif /*ZEPHYR_INCLUDE_DEBUG_OBJECT_TRACING_COMMON_H_*/