瀏覽代碼

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
Sebastian Hahn 14 年之前
父節點
當前提交
2efa6eb652
共有 1 個文件被更改,包括 1 次插入1 次删除
  1. 1 1
      src/common/compat.h

+ 1 - 1
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)