From: Sebastian Hahn Date: Tue, 9 Aug 2011 08:59:03 +0000 (+0200) Subject: Sockets are unsigned on windows X-Git-Tag: tor-0.2.3.8-alpha~14^2~1 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=2efa6eb652d9eb2dd6d91a5e4ef3e9eea1ac7d22;p=thirdparty%2Ftor.git Sockets are unsigned on windows this gets rid of a warning about signed/unsigned comparison This is a backport of 0a5338e03cdf14ef80584c6ff8adeb49200b8a76 that accidentally only went into master --- diff --git a/src/common/compat.h b/src/common/compat.h index 7e6058a547..011b9c8674 100644 --- a/src/common/compat.h +++ b/src/common/compat.h @@ -396,7 +396,7 @@ typedef int socklen_t; #ifdef MS_WINDOWS #define tor_socket_t intptr_t -#define SOCKET_OK(s) ((s) != INVALID_SOCKET) +#define SOCKET_OK(s) ((unsigned)(s) != INVALID_SOCKET) #else #define tor_socket_t int #define SOCKET_OK(s) ((s) >= 0)