瀏覽代碼

Sockets are unsigned on windows

this gets rid of a warning about signed/unsigned comparison
Sebastian Hahn 14 年之前
父節點
當前提交
0a5338e03c
共有 1 個文件被更改,包括 1 次插入1 次删除
  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)