aboutsummaryrefslogtreecommitdiff
path: root/tests/server/sockfilt.c
diff options
context:
space:
mode:
authorYang Tse <yangsita@gmail.com>2012-12-26 20:03:35 +0100
committerYang Tse <yangsita@gmail.com>2012-12-26 20:03:35 +0100
commiteb5aa12c8baddeba13594e515e8b0a7d94949177 (patch)
tree3ee55119b7259ca8229e8cb5988d5d03d0d75d62 /tests/server/sockfilt.c
parent77b5c0b2cfc800ce89af3ecce6d2304c4c8431f3 (diff)
sockfilt.c: commit b44da5a82a follow-up 2
Diffstat (limited to 'tests/server/sockfilt.c')
-rw-r--r--tests/server/sockfilt.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/tests/server/sockfilt.c b/tests/server/sockfilt.c
index c5a0b379f..93d0b5d14 100644
--- a/tests/server/sockfilt.c
+++ b/tests/server/sockfilt.c
@@ -422,7 +422,8 @@ static int select_ws(int nfds, fd_set *readfds, fd_set *writefds,
WSAEVENT wsaevent, *wsaevents;
WSANETWORKEVENTS wsanetevents;
HANDLE *handles;
- int error, fds, *fdarr;
+ curl_socket_t *fdarr;
+ int error, fds;
DWORD nfd = 0, wsa = 0;
int ret = 0;
@@ -437,7 +438,7 @@ static int select_ws(int nfds, fd_set *readfds, fd_set *writefds,
}
/* allocate internal array for the original input handles */
- fdarr = malloc(nfds * sizeof(int));
+ fdarr = malloc(nfds * sizeof(curl_socket_t));
if(fdarr == NULL) {
errno = ENOMEM;
return -1;
@@ -472,7 +473,7 @@ static int select_ws(int nfds, fd_set *readfds, fd_set *writefds,
networkevents |= FD_CLOSE;
if(networkevents) {
- fdarr[nfd] = fds;
+ fdarr[nfd] = (curl_socket_t)fds;
if(fds == fileno(stdin)) {
handles[nfd] = GetStdHandle(STD_INPUT_HANDLE);
}
@@ -599,7 +600,7 @@ static bool juggle(curl_socket_t *sockfdp,
FD_ZERO(&fds_write);
FD_ZERO(&fds_err);
- FD_SET(fileno(stdin), &fds_read);
+ FD_SET((curl_socket_t)fileno(stdin), &fds_read);
switch(*mode) {