Browse Source

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>
pull/14549/head
Flavio Ceolin 6 years ago committed by Anas Nashif
parent
commit
abf27d57a3
  1. 2
      kernel/mempool.c

2
kernel/mempool.c

@ -124,7 +124,7 @@ void k_mem_pool_free_id(struct k_mem_block_id *id) @@ -124,7 +124,7 @@ void k_mem_pool_free_id(struct k_mem_block_id *id)
need_sched = z_unpend_all(&p->wait_q);
if (need_sched) {
if (need_sched != 0) {
z_reschedule(&lock, key);
} else {
k_spin_unlock(&lock, key);

Loading…
Cancel
Save