summaryrefslogtreecommitdiff
path: root/nuttx/sched/sched_waitpid.c
diff options
context:
space:
mode:
authorpatacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3>2011-03-10 14:42:28 +0000
committerpatacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3>2011-03-10 14:42:28 +0000
commit506452c6fa4b7d408da0d332100f43a3102168ab (patch)
treebca4f4b7d50f699ff0c88572958ed38f6d747244 /nuttx/sched/sched_waitpid.c
parentebc734d8e40e310bc94bd8321a70ce1b8ef5d5a9 (diff)
downloadpx4-nuttx-506452c6fa4b7d408da0d332100f43a3102168ab.tar.gz
px4-nuttx-506452c6fa4b7d408da0d332100f43a3102168ab.tar.bz2
px4-nuttx-506452c6fa4b7d408da0d332100f43a3102168ab.zip
add apps/ dir
git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@3360 42af7a65-404d-4744-a932-0658087f49c3
Diffstat (limited to 'nuttx/sched/sched_waitpid.c')
-rw-r--r--nuttx/sched/sched_waitpid.c8
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;