]> 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>
Sun, 20 Nov 2011 14:15:14 +0000 (15:15 +0100)
this gets rid of a warning about signed/unsigned comparison

This is a backport of 0a5338e03cdf14ef80584c6ff8adeb49200b8a76 that
accidentally only went into master

src/common/compat.h

index 7e6058a54739e74343453dd647afa7ea2f0e31a6..011b9c867446943bf546e574793588d5db634331 100644 (file)
@@ -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)