kernel: Make statements evaluate boolean expressions

MISRA-C requires that the if statement has essentially Boolean type.

MISRA-C rule 14.4

Signed-off-by: Flavio Ceolin <flavio.ceolin@intel.com>
This commit is contained in:
Flavio Ceolin 2018-12-16 12:48:29 -08:00 committed by Anas Nashif
commit 76b3518ce6
14 changed files with 41 additions and 39 deletions

View file

@ -84,7 +84,7 @@ void k_mem_domain_init(struct k_mem_domain *domain, u8_t num_parts,
domain->num_partitions = 0;
(void)memset(domain->partitions, 0, sizeof(domain->partitions));
if (num_parts) {
if (num_parts != 0) {
u32_t i;
for (i = 0U; i < num_parts; i++) {