Skip to content

Commit 7ed7a8f

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 2dbebb9 commit 7ed7a8f

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

0 commit comments

Comments
 (0)