summaryrefslogtreecommitdiff
path: root/lib/libpthread/thread/thr_nanosleep.c
diff options
context:
space:
mode:
authorAlfred Perlstein <alfred@FreeBSD.org>1999-08-19 23:06:11 +0000
committerAlfred Perlstein <alfred@FreeBSD.org>1999-08-19 23:06:11 +0000
commit91518882e0644ea4047cdeffbed637e857906caa (patch)
treeb10bd9f64c914d3351cce2d7847b7bc1f73b2c5a /lib/libpthread/thread/thr_nanosleep.c
parentd3c6699913165313c0a4b2a03e7e068ede6c7384 (diff)
Notes
Diffstat (limited to 'lib/libpthread/thread/thr_nanosleep.c')
-rw-r--r--lib/libpthread/thread/thr_nanosleep.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/lib/libpthread/thread/thr_nanosleep.c b/lib/libpthread/thread/thr_nanosleep.c
index dd82efd99717..1a1e1739053a 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;