]> git.ipfire.org Git - thirdparty/tor.git/commitdiff
Sockets are unsigned on windows
authorSebastian Hahn <sebastian@torproject.org>
Tue, 9 Aug 2011 08:59:03 +0000 (10:59 +0200)
committerSebastian Hahn <sebastian@torproject.org>
Tue, 9 Aug 2011 09:03:16 +0000 (11:03 +0200)
this gets rid of a warning about signed/unsigned comparison

src/common/compat.h

index 98642e2d922b5f1e79d3238f2fa658a567406c4a..8e271ba90515f4f74e3fb064e6268110d065b7fa 100644 (file)
@@ -401,7 +401,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)