From 4c263f605cc20869401935f4927d0377c7df7c44 Mon Sep 17 00:00:00 2001 From: Alfred Perlstein Date: Thu, 19 Aug 1999 23:18:07 +0000 Subject: time_to_sleep->tv_nsec > 1000000000 -to- time_to_sleep->tv_nsec >= 1000000000 --- lib/libc_r/uthread/uthread_nanosleep.c | 4 ++-- lib/libkse/thread/thr_nanosleep.c | 4 ++-- lib/libpthread/thread/thr_nanosleep.c | 4 ++-- 3 files changed, 6 insertions(+), 6 deletions(-) (limited to 'lib') diff --git a/lib/libc_r/uthread/uthread_nanosleep.c b/lib/libc_r/uthread/uthread_nanosleep.c index 1a1e1739053a..41488ffae554 100644 --- a/lib/libc_r/uthread/uthread_nanosleep.c +++ b/lib/libc_r/uthread/uthread_nanosleep.c @@ -29,7 +29,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $Id: uthread_nanosleep.c,v 1.7 1999/08/05 12:15:18 deischen Exp $ + * $Id: uthread_nanosleep.c,v 1.8 1999/08/19 23:06:10 alfred Exp $ */ #include #include @@ -49,7 +49,7 @@ nanosleep(const struct timespec * time_to_sleep, /* Check if the time to sleep is legal: */ if (time_to_sleep == NULL || time_to_sleep->tv_sec < 0 || - time_to_sleep->tv_nsec < 0 || time_to_sleep->tv_nsec > 1000000000) { + time_to_sleep->tv_nsec < 0 || time_to_sleep->tv_nsec >= 1000000000) { /* Return an EINVAL error : */ errno = EINVAL; ret = -1; diff --git a/lib/libkse/thread/thr_nanosleep.c b/lib/libkse/thread/thr_nanosleep.c index 1a1e1739053a..41488ffae554 100644 --- a/lib/libkse/thread/thr_nanosleep.c +++ b/lib/libkse/thread/thr_nanosleep.c @@ -29,7 +29,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $Id: uthread_nanosleep.c,v 1.7 1999/08/05 12:15:18 deischen Exp $ + * $Id: uthread_nanosleep.c,v 1.8 1999/08/19 23:06:10 alfred Exp $ */ #include #include @@ -49,7 +49,7 @@ nanosleep(const struct timespec * time_to_sleep, /* Check if the time to sleep is legal: */ if (time_to_sleep == NULL || time_to_sleep->tv_sec < 0 || - time_to_sleep->tv_nsec < 0 || time_to_sleep->tv_nsec > 1000000000) { + time_to_sleep->tv_nsec < 0 || time_to_sleep->tv_nsec >= 1000000000) { /* Return an EINVAL error : */ errno = EINVAL; ret = -1; diff --git a/lib/libpthread/thread/thr_nanosleep.c b/lib/libpthread/thread/thr_nanosleep.c index 1a1e1739053a..41488ffae554 100644 --- a/lib/libpthread/thread/thr_nanosleep.c +++ b/lib/libpthread/thread/thr_nanosleep.c @@ -29,7 +29,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $Id: uthread_nanosleep.c,v 1.7 1999/08/05 12:15:18 deischen Exp $ + * $Id: uthread_nanosleep.c,v 1.8 1999/08/19 23:06:10 alfred Exp $ */ #include #include @@ -49,7 +49,7 @@ nanosleep(const struct timespec * time_to_sleep, /* Check if the time to sleep is legal: */ if (time_to_sleep == NULL || time_to_sleep->tv_sec < 0 || - time_to_sleep->tv_nsec < 0 || time_to_sleep->tv_nsec > 1000000000) { + time_to_sleep->tv_nsec < 0 || time_to_sleep->tv_nsec >= 1000000000) { /* Return an EINVAL error : */ errno = EINVAL; ret = -1; -- cgit v1.2.3