Skip to content
Snippets Groups Projects
Commit 04ddd8c5 authored by zeliard's avatar zeliard
Browse files

fix expression bug on socket creation failure (fd<0 is always false because fd...

fix expression bug on socket creation failure (fd<0 is always false because fd is unsigned and Windows returns ~0 (-1) on socket failure)
parents 81f750e7 7305dc69
No related branches found
No related tags found
No related merge requests found
...@@ -57,7 +57,7 @@ static int is_port_available(int *port, int is_tcp) { ...@@ -57,7 +57,7 @@ static int is_port_available(int *port, int is_tcp) {
GPR_ASSERT(*port >= 0); GPR_ASSERT(*port >= 0);
GPR_ASSERT(*port <= 65535); GPR_ASSERT(*port <= 65535);
if (fd < 0) { if (INVALID_SOCKET == fd) {
gpr_log(GPR_ERROR, "socket() failed: %s", strerror(errno)); gpr_log(GPR_ERROR, "socket() failed: %s", strerror(errno));
return 0; return 0;
} }
... ...
......
...@@ -146,14 +146,14 @@ ...@@ -146,14 +146,14 @@
</Link> </Link>
</ItemDefinitionGroup> </ItemDefinitionGroup>
<ItemGroup> <ItemGroup>
<ClCompile Include="..\..\test\core\end2end\cq_verifier.c">
</ClCompile>
<ClCompile Include="..\..\test\core\end2end\data\server1_cert.c"> <ClCompile Include="..\..\test\core\end2end\data\server1_cert.c">
</ClCompile> </ClCompile>
<ClCompile Include="..\..\test\core\end2end\data\server1_key.c"> <ClCompile Include="..\..\test\core\end2end\data\server1_key.c">
</ClCompile> </ClCompile>
<ClCompile Include="..\..\test\core\end2end\data\test_root_cert.c"> <ClCompile Include="..\..\test\core\end2end\data\test_root_cert.c">
</ClCompile> </ClCompile>
<ClCompile Include="..\..\test\core\end2end\cq_verifier.c">
</ClCompile>
<ClCompile Include="..\..\test\core\iomgr\endpoint_tests.c"> <ClCompile Include="..\..\test\core\iomgr\endpoint_tests.c">
</ClCompile> </ClCompile>
<ClCompile Include="..\..\test\core\statistics\census_log_tests.c"> <ClCompile Include="..\..\test\core\statistics\census_log_tests.c">
... ...
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment