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:
parent
063a9ce8c3
commit
abf27d57a3
|
@ -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…
Reference in a new issue