kernel: Explicitly comparing pointer with NULL

MISRA-C rule: 14.4

Signed-off-by: Flavio Ceolin <flavio.ceolin@intel.com>
This commit is contained in:
Flavio Ceolin 2018-09-20 16:30:45 -07:00 committed by Anas Nashif
commit ea716bf023
11 changed files with 17 additions and 16 deletions

View file

@ -117,7 +117,7 @@ void k_mem_slab_free(struct k_mem_slab *slab, void **mem)
int key = irq_lock();
struct k_thread *pending_thread = _unpend_first_thread(&slab->wait_q);
if (pending_thread) {
if (pending_thread != NULL) {
_set_thread_return_value_with_data(pending_thread, 0, *mem);
_ready_thread(pending_thread);
_reschedule(key);