ws2_32: Clear last error in WSASocketW.

Signed-off-by: Alex Henrie <alexhenrie24@gmail.com>
Signed-off-by: Zebediah Figura <zfigura@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
Alex Henrie 2021-10-17 23:45:28 -06:00 committed by Alexandre Julliard
parent b344d1d091
commit 63110f9879
2 changed files with 2 additions and 1 deletions

View File

@ -3363,6 +3363,7 @@ SOCKET WINAPI WSASocketW(int af, int type, int protocol,
CloseHandle(handle);
return INVALID_SOCKET;
}
WSASetLastError(0);
return ret;
done:

View File

@ -2418,7 +2418,7 @@ static void test_WSASocket(void)
{
SetLastError( 0xdeadbeef );
sock = WSASocketA( tests[i].family, tests[i].type, tests[i].protocol, NULL, 0, 0 );
todo_wine_if (!tests[i].error || i == 7)
todo_wine_if (i == 7)
ok(WSAGetLastError() == tests[i].error, "Test %u: got wrong error %u\n", i, WSAGetLastError());
if (tests[i].error)
{