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; }