diff options
author | Dan Zhang <emaildanzhang@gmail.com> | 2011-11-09 15:55:16 +0800 |
---|---|---|
committer | Andy Green <andy.green@linaro.org> | 2011-11-09 15:55:16 +0800 |
commit | f2e5e985c3b51b8c50b8a7c9ee3fbd321c194c35 (patch) | |
tree | 6da5d3461dbc768a51003f0cd10e6fbca50c2179 /win32port | |
parent | 20b66e99392572fce2f5e72379015a5330f5bdfb (diff) | |
download | libwebsockets-f2e5e985c3b51b8c50b8a7c9ee3fbd321c194c35.tar.gz |
cleanup fixes tested on win32 compiler
Signed-off-by: Dan Zhang <emaildanzhang@gmail.com>
Diffstat (limited to 'win32port')
-rw-r--r-- | win32port/win32helpers/websock-w32.c | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/win32port/win32helpers/websock-w32.c b/win32port/win32helpers/websock-w32.c index fcf1a851..d412c0c9 100644 --- a/win32port/win32helpers/websock-w32.c +++ b/win32port/win32helpers/websock-w32.c @@ -17,7 +17,7 @@ INT WSAAPI emulated_poll(LPWSAPOLLFD fdarray, ULONG nfds, INT timeout) ULONG n = 0; int waiting; int pending = 0; - WSAPOLLFD * const poll_fd = fdarray; + WSAPOLLFD * poll_fd = fdarray; if (NULL == fdarray) { errno = EFAULT; @@ -38,17 +38,17 @@ INT WSAAPI emulated_poll(LPWSAPOLLFD fdarray, ULONG nfds, INT timeout) poll_fd->revents = 0; if (poll_fd->fd < 0 || !poll_fd->events) - goto skip; + goto skip1; if (max_socket < poll_fd->fd) max_socket = poll_fd->fd; if (poll_fd->events & POLLIN) - FD_SET(sock, &readfds); + FD_SET(poll_fd->fd, &readfds); if (poll_fd->events & POLLOUT) - FD_SET(sock, &writefds); -skip: + FD_SET(poll_fd->fd, &writefds); +skip1: poll_fd++; n++; } @@ -63,11 +63,11 @@ skip: while (waiting && nfds--) { if (!poll_fd->events) - goto skip; + goto skip2; if (poll_fd->fd <= 0) { poll_fd->revents = POLLNVAL; - goto skip; + goto skip2; } if (FD_ISSET(poll_fd->fd, &readfds)) { @@ -87,7 +87,7 @@ skip: if (poll_fd->revents) pending++; -skip: +skip2: poll_fd++; } |