diff options
author | ache <ache@FreeBSD.org> | 1997-08-14 06:46:44 +0000 |
---|---|---|
committer | ache <ache@FreeBSD.org> | 1997-08-14 06:46:44 +0000 |
commit | 051a2e06f57a036613bcdc06f3de53f4f23744cf (patch) | |
tree | 71361104ea074e28ac22409d5a696b02a3de3a68 /lib/libc/gen/usleep.c | |
parent | 057a30e59cd19f56a449612ceabf06998fe61fb3 (diff) | |
download | FreeBSD-src-051a2e06f57a036613bcdc06f3de53f4f23744cf.zip FreeBSD-src-051a2e06f57a036613bcdc06f3de53f4f23744cf.tar.gz |
Oops, fix logic for previous commit
Diffstat (limited to 'lib/libc/gen/usleep.c')
-rw-r--r-- | lib/libc/gen/usleep.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/lib/libc/gen/usleep.c b/lib/libc/gen/usleep.c index 3a0dee1..ebb90c4 100644 --- a/lib/libc/gen/usleep.c +++ b/lib/libc/gen/usleep.c @@ -69,9 +69,9 @@ usleep(useconds) do { (void)nanosleep(&time_to_sleep, &time_remaining); time_to_sleep = time_remaining; - } while (!errno || errno == EINTR || - time_to_sleep.tv_sec != 0 || - time_to_sleep.tv_nsec != 0); + } while ((!errno || errno == EINTR) && + (time_to_sleep.tv_sec != 0 || + time_to_sleep.tv_nsec != 0)); } #else struct timespec time_to_sleep; @@ -122,8 +122,8 @@ usleep(useconds) &omask); time_to_sleep = time_remaining; } while (!alarm_termination && - (!errno || errno == EINTR || - time_to_sleep.tv_sec != 0 || + (!errno || errno == EINTR) && + (time_to_sleep.tv_sec != 0 || time_to_sleep.tv_nsec != 0)); if (!alarm_blocked) { |