Skip to content

Commit 42a7515

Browse files
committed
compat/mingw: drop outdated comment
The part about keeping the original error number hasn't been accurate since commit c11f75c (mingw: make sure errno is set correctly when socket operations fail, 2019-11-25) and the part about strerror() not knowing about these errors is untrue since the previous commit. Signed-off-by: Matthias Aßhauer <[email protected]>
1 parent be46d2d commit 42a7515

File tree

1 file changed

+0
-9
lines changed

1 file changed

+0
-9
lines changed

compat/mingw.c

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -2744,15 +2744,6 @@ int mingw_socket(int domain, int type, int protocol)
27442744
ensure_socket_initialization();
27452745
s = WSASocket(domain, type, protocol, NULL, 0, 0);
27462746
if (s == INVALID_SOCKET) {
2747-
/*
2748-
* WSAGetLastError() values are regular BSD error codes
2749-
* biased by WSABASEERR.
2750-
* However, strerror() does not know about networking
2751-
* specific errors, which are values beginning at 38 or so.
2752-
* Therefore, we choose to leave the biased error code
2753-
* in errno so that _if_ someone looks up the code somewhere,
2754-
* then it is at least the number that are usually listed.
2755-
*/
27562747
set_wsa_errno();
27572748
return -1;
27582749
}

0 commit comments

Comments
 (0)