diff --git a/libc/unistd/lib_execl.c b/libc/unistd/lib_execl.c index aa57c4cb52e..ba5551066f4 100644 --- a/libc/unistd/lib_execl.c +++ b/libc/unistd/lib_execl.c @@ -40,7 +40,9 @@ #include #include +#include #include +#include #ifdef CONFIG_LIBC_EXECFUNCS @@ -155,7 +157,7 @@ int execl(FAR const char *path, ...) if (nargs > 0) { argv = (FAR char **)malloc((nargs + 1) * sizeof(FAR char *)); - if (argv = (FAR char **)NULL) + if (argv == (FAR char **)NULL) { set_errno(ENOMEM); return ERROR; diff --git a/sched/task/task_setup.c b/sched/task/task_setup.c index 03ee33017c9..1b838eea34b 100644 --- a/sched/task/task_setup.c +++ b/sched/task/task_setup.c @@ -496,7 +496,7 @@ static inline int task_stackargsetup(FAR struct task_tcb_s *tcb, */ strtablen += (strlen(argv[argc]) + 1); - if (strtablen >= tcb->adj_stack_size) + if (strtablen >= tcb->cmn.adj_stack_size) { return -ENAMETOOLONG; }