diff options
Diffstat (limited to 'lib/libpthread/thread/thr_nanosleep.c')
-rw-r--r-- | lib/libpthread/thread/thr_nanosleep.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/lib/libpthread/thread/thr_nanosleep.c b/lib/libpthread/thread/thr_nanosleep.c index dd82efd..1a1e173 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$ + * $Id: uthread_nanosleep.c,v 1.7 1999/08/05 12:15:18 deischen Exp $ */ #include <stdio.h> #include <errno.h> @@ -48,7 +48,8 @@ nanosleep(const struct timespec * time_to_sleep, struct timeval tv; /* Check if the time to sleep is legal: */ - if (time_to_sleep == NULL || time_to_sleep->tv_nsec < 0 || time_to_sleep->tv_nsec > 1000000000) { + if (time_to_sleep == NULL || time_to_sleep->tv_sec < 0 || + time_to_sleep->tv_nsec < 0 || time_to_sleep->tv_nsec > 1000000000) { /* Return an EINVAL error : */ errno = EINVAL; ret = -1; |