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
parent 92ea2f9189
commit ea716bf023
11 changed files with 17 additions and 16 deletions

View File

@@ -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,