connect: Fixed some socket build warnings on windows.

This commit is contained in:
Andreas Schneider
2010-06-18 12:43:12 +02:00
parent 54ef77123a
commit a85a4cc192

View File

@@ -390,6 +390,7 @@ int ssh_select(ssh_channel *channels, ssh_channel *outchannels, socket_t maxfd,
fd_set *readfds, struct timeval *timeout) { fd_set *readfds, struct timeval *timeout) {
struct timeval zerotime; struct timeval zerotime;
fd_set localset, localset2; fd_set localset, localset2;
socket_t f;
int rep; int rep;
int set; int set;
int i; int i;
@@ -430,8 +431,8 @@ int ssh_select(ssh_channel *channels, ssh_channel *outchannels, socket_t maxfd,
/* Look into the localset for active fd */ /* Look into the localset for active fd */
set = 0; set = 0;
for (i = 0; (i < maxfd) && !set; i++) { for (f = 0; (f < maxfd) && !set; f++) {
if (FD_ISSET(i, &localset)) { if (FD_ISSET(f, &localset)) {
set = 1; set = 1;
} }
} }
@@ -493,9 +494,9 @@ int ssh_select(ssh_channel *channels, ssh_channel *outchannels, socket_t maxfd,
outchannels[j] = NULL; outchannels[j] = NULL;
FD_ZERO(&localset2); FD_ZERO(&localset2);
for (i = 0; i < maxfd; i++) { for (f = 0; f < maxfd; f++) {
if (FD_ISSET(i, readfds) && FD_ISSET(i, &localset)) { if (FD_ISSET(f, readfds) && FD_ISSET(i, &localset)) {
FD_SET(i, &localset2); FD_SET(f, &localset2);
} }
} }