mirror of
https://github.com/git-for-windows/git.git
synced 2026-05-31 02:17:14 -05:00
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 <mha1993@live.de>
Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
This commit is contained in:
committed by
Johannes Schindelin
parent
af9a2b699f
commit
0cf45c8d9f
@@ -2795,15 +2795,6 @@ int mingw_socket(int domain, int type, int protocol)
|
|||||||
ensure_socket_initialization();
|
ensure_socket_initialization();
|
||||||
s = WSASocket(domain, type, protocol, NULL, 0, 0);
|
s = WSASocket(domain, type, protocol, NULL, 0, 0);
|
||||||
if (s == INVALID_SOCKET) {
|
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();
|
set_wsa_errno();
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user