summaryrefslogtreecommitdiffstats
path: root/cpukit/libfs/src/pipe
diff options
context:
space:
mode:
authorJoel Sherrill <joel.sherrill@OARcorp.com>2010-07-09 18:39:36 +0000
committerJoel Sherrill <joel.sherrill@OARcorp.com>2010-07-09 18:39:36 +0000
commit18bd1bd4ddd345aae30e7cec3c5061040d9c9fda (patch)
tree70d2328fcddfe53aca3327e3cef0dfd5e2e5c604 /cpukit/libfs/src/pipe
parent2010-07-08 Joel Sherrill <joel.sherrill@oarcorp.com> (diff)
downloadrtems-18bd1bd4ddd345aae30e7cec3c5061040d9c9fda.tar.bz2
2010-07-09 Bharath Suri <bharath.s.jois@gmail.com>
* libfs/src/pipe/pipe.c: Check for err before setting the errno and returning -1 to the caller.
Diffstat (limited to 'cpukit/libfs/src/pipe')
-rw-r--r--cpukit/libfs/src/pipe/pipe.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/cpukit/libfs/src/pipe/pipe.c b/cpukit/libfs/src/pipe/pipe.c
index a7a78e95fa..ff98719e29 100644
--- a/cpukit/libfs/src/pipe/pipe.c
+++ b/cpukit/libfs/src/pipe/pipe.c
@@ -72,7 +72,8 @@ int pipe_create(
}
unlink(fifopath);
}
-
- rtems_set_errno_and_return_minus_one(err);
+ if(err != 0)
+ rtems_set_errno_and_return_minus_one(err);
+ return 0;
}