diff options
Diffstat (limited to 'nuttx/sched/sched_waitpid.c')
-rw-r--r-- | nuttx/sched/sched_waitpid.c | 8 |
1 files changed, 1 insertions, 7 deletions
diff --git a/nuttx/sched/sched_waitpid.c b/nuttx/sched/sched_waitpid.c index 6e544f2eb..a1af343e1 100644 --- a/nuttx/sched/sched_waitpid.c +++ b/nuttx/sched/sched_waitpid.c @@ -195,12 +195,6 @@ pid_t waitpid(pid_t pid, int *stat_loc, int options) /* None of the options are supported */ #ifdef CONFIG_DEBUG - if (stat_loc == NULL) - { - err = EINVAL; - goto errout_with_errno; - } - if (options != 0) { err = ENOSYS; @@ -214,7 +208,7 @@ pid_t waitpid(pid_t pid, int *stat_loc, int options) * others? */ - if (tcb->stat_loc == NULL) + if (stat_loc != NULL && tcb->stat_loc == NULL) { tcb->stat_loc = stat_loc; mystat = true; |