Procházet zdrojové kódy

Sockets are unsigned on windows

this gets rid of a warning about signed/unsigned comparison
Sebastian Hahn před 14 roky
rodič
revize
0a5338e03c
1 změnil soubory, kde provedl 1 přidání a 1 odebrání
  1. 1 1
      src/common/compat.h

+ 1 - 1
src/common/compat.h

@@ -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)