From 725c9df6087ae05c99d0b57fb0609be73adfbf29 Mon Sep 17 00:00:00 2001 From: Zack Middleton Date: Tue, 19 Jun 2012 16:12:16 +0000 Subject: [PATCH] =?UTF-8?q?#5672=20-=20Fixed=20incorrect=20type=20usage=20?= =?UTF-8?q?in=20NET=5FSleep(),=20patch=20from=20=C3=96zkan=20Sezer.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- code/qcommon/net_ip.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/code/qcommon/net_ip.c b/code/qcommon/net_ip.c index 262ae7c3..fb76206a 100644 --- a/code/qcommon/net_ip.c +++ b/code/qcommon/net_ip.c @@ -1655,7 +1655,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; @@ -1672,7 +1673,7 @@ void NET_Sleep(int msec) { FD_SET(ip6_socket, &fdr); - if((int)ip6_socket > highestfd) + if(ip6_socket > highestfd) highestfd = ip6_socket; } @@ -1680,7 +1681,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);