Commit a6cbdb7d authored by Zebediah Figura's avatar Zebediah Figura Committed by Alexandre Julliard

ws2_32: Return WSAEFAULT instead of WSAEINVAL from WSAStartup() if "data" is NULL.

parent 5efc6369
......@@ -594,7 +594,7 @@ int WINAPI WSAStartup( WORD version, WSADATA *data )
if (!LOBYTE(version))
return WSAVERNOTSUPPORTED;
if (!data) return WSAEINVAL;
if (!data) return WSAEFAULT;
num_startup++;
TRACE( "increasing startup count to %d\n", num_startup );
......
......@@ -2880,8 +2880,7 @@ static void test_startup(void)
ok(WSAGetLastError() == WSANOTINITIALISED, "got error %u\n", WSAGetLastError());
ret = WSAStartup(tests[i].version, NULL);
todo_wine_if (LOBYTE(tests[i].version))
ok(ret == (LOBYTE(tests[i].version) ? WSAEFAULT : WSAVERNOTSUPPORTED), "got %d\n", ret);
ok(ret == (LOBYTE(tests[i].version) ? WSAEFAULT : WSAVERNOTSUPPORTED), "got %d\n", ret);
winetest_pop_context();
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment