mirror of
https://github.com/Dasharo/zephyr.git
synced 2026-03-06 14:57:20 -08:00
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:
committed by
Anas Nashif
parent
92ea2f9189
commit
ea716bf023
@@ -62,7 +62,7 @@ int _impl_k_stack_alloc_init(struct k_stack *stack, unsigned int num_entries)
|
||||
int ret;
|
||||
|
||||
buffer = z_thread_malloc(num_entries);
|
||||
if (buffer) {
|
||||
if (buffer != NULL) {
|
||||
k_stack_init(stack, buffer, num_entries);
|
||||
stack->flags = K_STACK_FLAG_ALLOC;
|
||||
ret = 0;
|
||||
@@ -105,7 +105,7 @@ void _impl_k_stack_push(struct k_stack *stack, u32_t data)
|
||||
|
||||
first_pending_thread = _unpend_first_thread(&stack->wait_q);
|
||||
|
||||
if (first_pending_thread) {
|
||||
if (first_pending_thread != NULL) {
|
||||
_ready_thread(first_pending_thread);
|
||||
|
||||
_set_thread_return_value_with_data(first_pending_thread,
|
||||
|
||||
Reference in New Issue
Block a user