Skip to content

Commit

Permalink
compat/mingw: drop outdated comment
Browse files Browse the repository at this point in the history
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 <mha1993@live.de>
  • Loading branch information
rimrul committed Dec 22, 2024
1 parent be46d2d commit 42a7515
Showing 1 changed file with 0 additions and 9 deletions.
9 changes: 0 additions & 9 deletions compat/mingw.c
Original file line number Diff line number Diff line change
Expand Up @@ -2744,15 +2744,6 @@ int mingw_socket(int domain, int type, int protocol)
ensure_socket_initialization();
s = WSASocket(domain, type, protocol, NULL, 0, 0);
if (s == INVALID_SOCKET) {
/*
* WSAGetLastError() values are regular BSD error codes
* biased by WSABASEERR.
* However, strerror() does not know about networking
* specific errors, which are values beginning at 38 or so.
* Therefore, we choose to leave the biased error code
* in errno so that _if_ someone looks up the code somewhere,
* then it is at least the number that are usually listed.
*/
set_wsa_errno();
return -1;
}
Expand Down

0 comments on commit 42a7515

Please # to comment.