diff options
| author | Daniel Eischen <deischen@FreeBSD.org> | 1999-08-30 00:02:08 +0000 |
|---|---|---|
| committer | Daniel Eischen <deischen@FreeBSD.org> | 1999-08-30 00:02:08 +0000 |
| commit | 3e12058d250979a442f182191a5ce1ac30e883ee (patch) | |
| tree | 13739692ec180d8ab98c172f455828a41ce0702a /lib/libpthread/thread/thr_select.c | |
| parent | 293515f6787b4ef5ff8bce69ca6b5d5cd7f4cacd (diff) | |
Notes
Diffstat (limited to 'lib/libpthread/thread/thr_select.c')
| -rw-r--r-- | lib/libpthread/thread/thr_select.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/lib/libpthread/thread/thr_select.c b/lib/libpthread/thread/thr_select.c index a7ea8cfabcd7..9bfae89be374 100644 --- a/lib/libpthread/thread/thr_select.c +++ b/lib/libpthread/thread/thr_select.c @@ -59,8 +59,10 @@ select(int numfds, fd_set * readfds, fd_set * writefds, /* Check if a timeout was specified: */ if (timeout) { if (timeout->tv_sec < 0 || - timeout->tv_usec < 0 || timeout->tv_usec >= 1000000) - return (EINVAL); + timeout->tv_usec < 0 || timeout->tv_usec >= 1000000) { + errno = EINVAL; + return (-1); + } /* Convert the timeval to a timespec: */ TIMEVAL_TO_TIMESPEC(timeout, &ts); |
