summaryrefslogtreecommitdiff
path: root/gnu
diff options
context:
space:
mode:
authorTodd C. Miller <millert@cvs.openbsd.org>2003-08-12 21:20:31 +0000
committerTodd C. Miller <millert@cvs.openbsd.org>2003-08-12 21:20:31 +0000
commitd42c6e3fd0c147924de4890508ded49507ebe05c (patch)
treeeaa6a505dfe0b0b4b4d242829be862665fe37b8c /gnu
parent97314a59e88b8f6cd06d1aaf484dba3fd2a2216c (diff)
Stop the madness, though shalt not pass FD_SETSIZE as the first param to
select(2) needlessly. deraadt@ OK
Diffstat (limited to 'gnu')
-rw-r--r--gnu/usr.bin/lynx/WWW/Library/Implementation/HTTCP.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/gnu/usr.bin/lynx/WWW/Library/Implementation/HTTCP.c b/gnu/usr.bin/lynx/WWW/Library/Implementation/HTTCP.c
index fd916955c4a..51db92bd25a 100644
--- a/gnu/usr.bin/lynx/WWW/Library/Implementation/HTTCP.c
+++ b/gnu/usr.bin/lynx/WWW/Library/Implementation/HTTCP.c
@@ -1733,11 +1733,11 @@ PUBLIC int HTDoConnect ARGS4(
FD_SET((unsigned) *s, &writefds);
#ifdef SOCKS
if (socks_flag)
- ret = Rselect(FD_SETSIZE, NULL,
+ ret = Rselect(*s + 1, NULL,
(void *)&writefds, NULL, &select_timeout);
else
#endif /* SOCKS */
- ret = select(FD_SETSIZE, NULL, (void *)&writefds, NULL, &select_timeout);
+ ret = select(*s + 1, NULL, (void *)&writefds, NULL, &select_timeout);
#ifdef SOCKET_DEBUG_TRACE
if (tries == 1) {
@@ -2005,11 +2005,11 @@ PUBLIC int HTDoRead ARGS3(
FD_SET((unsigned)fildes, &readfds);
#ifdef SOCKS
if (socks_flag)
- ret = Rselect(FD_SETSIZE,
+ ret = Rselect(fildes + 1,
(void *)&readfds, NULL, NULL, &select_timeout);
else
#endif /* SOCKS */
- ret = select(FD_SETSIZE,
+ ret = select(fildes + 1,
(void *)&readfds, NULL, NULL, &select_timeout);
} while ((ret == -1) && (errno == EINTR));