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:
parent
92ea2f9189
commit
ea716bf023
11 changed files with 17 additions and 16 deletions
|
@ -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);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue