summaryrefslogtreecommitdiff
path: root/lib/libpthread/thread/thr_select.c
diff options
context:
space:
mode:
authorAlfred Perlstein <alfred@FreeBSD.org>1999-08-20 21:06:20 +0000
committerAlfred Perlstein <alfred@FreeBSD.org>1999-08-20 21:06:20 +0000
commit89f6acf96aaf928b693b36c19807f24b7c76c323 (patch)
tree3c60107297872f744528f80874d787707690298f /lib/libpthread/thread/thr_select.c
parent1744fcd082234a07ccb0fa12c271f851d627b95d (diff)
Notes
Diffstat (limited to 'lib/libpthread/thread/thr_select.c')
-rw-r--r--lib/libpthread/thread/thr_select.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/lib/libpthread/thread/thr_select.c b/lib/libpthread/thread/thr_select.c
index 2042fde4ac56..217916003f7f 100644
--- a/lib/libpthread/thread/thr_select.c
+++ b/lib/libpthread/thread/thr_select.c
@@ -29,7 +29,7 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
- * $Id: uthread_select.c,v 1.9 1999/08/05 12:15:21 deischen Exp $
+ * $Id: uthread_select.c,v 1.10 1999/08/19 23:06:11 alfred Exp $
*/
#include <unistd.h>
#include <errno.h>
@@ -53,15 +53,15 @@ select(int numfds, fd_set * readfds, fd_set * writefds,
int pfd_index, got_one = 0, fd_count = 0;
struct pthread_poll_data data;
- if (timeout->tv_sec < 0 ||
- timeout->tv_usec < 0 || timeout->tv_usec >= 1000000)
- return (EINVAL);
-
if (numfds > _thread_dtablesize) {
numfds = _thread_dtablesize;
}
/* Check if a timeout was specified: */
if (timeout) {
+ if (timeout->tv_sec < 0 ||
+ timeout->tv_usec < 0 || timeout->tv_usec >= 1000000)
+ return (EINVAL);
+
/* Convert the timeval to a timespec: */
TIMEVAL_TO_TIMESPEC(timeout, &ts);