about summary refs log tree commit diff
path: root/sysdeps/mach/nanosleep.c
diff options
context:
space:
mode:
Diffstat (limited to 'sysdeps/mach/nanosleep.c')
-rw-r--r--sysdeps/mach/nanosleep.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/sysdeps/mach/nanosleep.c b/sysdeps/mach/nanosleep.c
index 67caa3ea8a..555251f842 100644
--- a/sysdeps/mach/nanosleep.c
+++ b/sysdeps/mach/nanosleep.c
@@ -30,8 +30,7 @@ __libc_nanosleep (const struct timespec *requested_time,
   struct timeval before, after;
 
   if (requested_time->tv_sec < 0
-      || requested_time->tv_nsec < 0
-      || requested_time->tv_nsec >= 1000000000)
+      || ! valid_nanoseconds (requested_time->tv_nsec))
     {
       errno = EINVAL;
       return -1;