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

@ -9,6 +9,7 @@
#include <kernel_structs.h>
#include <tracing.h>
#include <stdbool.h>
#ifdef CONFIG_MULTITHREADING
#define _VALID_PRIO(prio, entry_point) \
@ -24,7 +25,7 @@
(prio), \
K_LOWEST_APPLICATION_THREAD_PRIO, \
K_HIGHEST_APPLICATION_THREAD_PRIO); \
} while ((0))
} while (false)
#else
#define _VALID_PRIO(prio, entry_point) ((prio) == -1)
#define _ASSERT_VALID_PRIO(prio, entry_point) __ASSERT((prio) == -1, "")