浏览代码

Fix ret assignment

James Urquhart 8 年之前
父节点
当前提交
1f69a708fb
共有 1 个文件被更改,包括 1 次插入2 次删除
  1. 1 2
      Engine/source/platform/platformNet.cpp

+ 1 - 2
Engine/source/platform/platformNet.cpp

@@ -1777,13 +1777,12 @@ Net::Error Net::stringToAddress(const char *addressString, NetAddress  *address,
          if (!hostLookup && !hasInterface)
             return NeedHostLookup;
          
-         int ret = 0;
          struct addrinfo hint, *res = NULL;
          dMemset(&hint, 0, sizeof(hint));
          hint.ai_family = actualFamily;
          hint.ai_flags = hostLookup ? 0 : AI_NUMERICHOST;
          
-         if (ret = getaddrinfo(addressString, NULL, &hint, &res) == 0)
+         if (getaddrinfo(addressString, NULL, &hint, &res) == 0)
          {
             if (actualFamily != AF_UNSPEC)
             {