From 18bd1bd4ddd345aae30e7cec3c5061040d9c9fda Mon Sep 17 00:00:00 2001 From: Joel Sherrill Date: Fri, 9 Jul 2010 18:39:36 +0000 Subject: 2010-07-09 Bharath Suri * libfs/src/pipe/pipe.c: Check for err before setting the errno and returning -1 to the caller. --- cpukit/ChangeLog | 5 +++++ cpukit/libfs/src/pipe/pipe.c | 5 +++-- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/cpukit/ChangeLog b/cpukit/ChangeLog index 039d7e8d66..58d9a75279 100644 --- a/cpukit/ChangeLog +++ b/cpukit/ChangeLog @@ -1,3 +1,8 @@ +2010-07-09 Bharath Suri + + * libfs/src/pipe/pipe.c: Check for err before setting the errno + and returning -1 to the caller. + 2010-07-08 Joel Sherrill * libcsupport/src/malloc_initialize.c: Clean up sbrk path now that a 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; } -- cgit v1.2.3