diff options
author | Zack Middleton <zturtleman@gmail.com> | 2012-06-19 16:12:16 +0000 |
---|---|---|
committer | Tim Angus <tim@ngus.net> | 2013-01-12 20:41:22 +0000 |
commit | 6dcbcd8b21425a6054a1ebb2f0b7f213d08c8334 (patch) | |
tree | d1699666dd45bea468428746f9c51d35c8952d44 /src | |
parent | d1a5ea147134aa0da478f8b6bcd837ffe6be615c (diff) |
#5672 - Fixed incorrect type usage in NET_Sleep(), patch from Özkan Sezer.
Diffstat (limited to 'src')
-rw-r--r-- | src/qcommon/net_ip.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/qcommon/net_ip.c b/src/qcommon/net_ip.c index 6b4161a5..84396472 100644 --- a/src/qcommon/net_ip.c +++ b/src/qcommon/net_ip.c @@ -1652,7 +1652,8 @@ void NET_Sleep(int msec) { struct timeval timeout; fd_set fdr; - int highestfd = -1, retval; + int retval; + SOCKET highestfd = INVALID_SOCKET; if(msec < 0) msec = 0; @@ -1669,7 +1670,7 @@ void NET_Sleep(int msec) { FD_SET(ip6_socket, &fdr); - if((int)ip6_socket > highestfd) + if(ip6_socket > highestfd) highestfd = ip6_socket; } @@ -1677,7 +1678,7 @@ void NET_Sleep(int msec) timeout.tv_usec = (msec%1000)*1000; #ifdef _WIN32 - if(highestfd < 0) + if(highestfd == INVALID_SOCKET) { // windows ain't happy when select is called without valid FDs SleepEx(msec, 0); |