Skip to content

Commit 0cf45c8

Browse files
rimruldscho
authored andcommitted
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]> Signed-off-by: Johannes Schindelin <[email protected]>
1 parent af9a2b6 commit 0cf45c8

File tree

1 file changed

+0
-9
lines changed

1 file changed

+0
-9
lines changed

compat/mingw.c

-9
Original file line numberDiff line numberDiff line change
@@ -2795,15 +2795,6 @@ int mingw_socket(int domain, int type, int protocol)
27952795
ensure_socket_initialization();
27962796
s = WSASocket(domain, type, protocol, NULL, 0, 0);
27972797
if (s == INVALID_SOCKET) {
2798-
/*
2799-
* WSAGetLastError() values are regular BSD error codes
2800-
* biased by WSABASEERR.
2801-
* However, strerror() does not know about networking
2802-
* specific errors, which are values beginning at 38 or so.
2803-
* Therefore, we choose to leave the biased error code
2804-
* in errno so that _if_ someone looks up the code somewhere,
2805-
* then it is at least the number that are usually listed.
2806-
*/
28072798
set_wsa_errno();
28082799
return -1;
28092800
}

0 commit comments

Comments
 (0)