[rtems commit] posix: Fix error status
Sebastian Huber
sebh at rtems.org
Wed Jul 27 07:10:01 UTC 2016
Module: rtems
Branch: master
Commit: dfa2cdb15db5a28045b7fa76ea871a3b7b6d02a8
Changeset: http://git.rtems.org/rtems/commit/?id=dfa2cdb15db5a28045b7fa76ea871a3b7b6d02a8
Author: Sebastian Huber <sebastian.huber at embedded-brains.de>
Date: Wed Jul 27 09:09:01 2016 +0200
posix: Fix error status
---
cpukit/posix/src/nanosleep.c | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/cpukit/posix/src/nanosleep.c b/cpukit/posix/src/nanosleep.c
index 2c7f9fa..779dc20 100644
--- a/cpukit/posix/src/nanosleep.c
+++ b/cpukit/posix/src/nanosleep.c
@@ -136,8 +136,9 @@ int nanosleep(
* NOTE: This behavior is beyond the POSIX specification.
* FSU and GNU/Linux pthreads shares this behavior.
*/
- if ( !_Timespec_Is_valid( rqtp ) )
- return EINVAL;
+ if ( !_Timespec_Is_valid( rqtp ) ) {
+ rtems_set_errno_and_return_minus_one( EINVAL );
+ }
relative_interval = _Timespec_To_ticks( rqtp );
if ( relative_interval == 0 )
More information about the vc
mailing list