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 2019-03-08 14:58:38 -08:00 committed by Anas Nashif
parent 063a9ce8c3
commit abf27d57a3

View file

@ -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);