summaryrefslogtreecommitdiffstats
path: root/cpukit/posix/src/nanosleep.c
diff options
context:
space:
mode:
authorJennifer Averett <Jennifer.Averett@OARcorp.com>2010-06-22 15:36:06 +0000
committerJennifer Averett <Jennifer.Averett@OARcorp.com>2010-06-22 15:36:06 +0000
commitf5dc557118e74876e3b11a51bf4d32d736785754 (patch)
tree6781705fc69224679deb235c4ff06e27e1c51a5d /cpukit/posix/src/nanosleep.c
parent2010-06-22 Sebastian Huber <sebastian.huber@embedded-brains.de> (diff)
downloadrtems-f5dc557118e74876e3b11a51bf4d32d736785754.tar.bz2
2010-06-22 Jennifer Averett <Jennifer.Averett@OARcorp.com>
* posix/src/nanosleep.c, posix/src/timersettime.c: Removed redundent code and cleaned up error checking code.
Diffstat (limited to 'cpukit/posix/src/nanosleep.c')
-rw-r--r--cpukit/posix/src/nanosleep.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/cpukit/posix/src/nanosleep.c b/cpukit/posix/src/nanosleep.c
index e83f1c8277..5031039c24 100644
--- a/cpukit/posix/src/nanosleep.c
+++ b/cpukit/posix/src/nanosleep.c
@@ -36,8 +36,6 @@ int nanosleep(
{
Watchdog_Interval ticks;
- if ( !_Timespec_Is_valid( rqtp ) )
- rtems_set_errno_and_return_minus_one( EINVAL );
/*
* Return EINVAL if the delay interval is negative.
@@ -45,7 +43,7 @@ int nanosleep(
* NOTE: This behavior is beyond the POSIX specification.
* FSU and GNU/Linux pthreads shares this behavior.
*/
- if ( rqtp->tv_sec < 0 || rqtp->tv_nsec < 0 )
+ if ( !_Timespec_Is_valid( rqtp ) )
rtems_set_errno_and_return_minus_one( EINVAL );
ticks = _Timespec_To_ticks( rqtp );