Commit 671cf16f authored by Zebediah Figura's avatar Zebediah Figura Committed by Alexandre Julliard

ws2_32: Reimplement inet_addr() on top of inet_pton().

parent b159f6e2
......@@ -2025,10 +2025,13 @@ int WINAPI WSAAddressToStringW( struct WS_sockaddr *addr, DWORD addr_len,
/***********************************************************************
* inet_addr (ws2_32.11)
*/
WS_u_long WINAPI WS_inet_addr( const char *cp )
WS_u_long WINAPI WS_inet_addr( const char *str )
{
if (!cp) return INADDR_NONE;
return inet_addr( cp );
WS_u_long addr;
if (WS_inet_pton( WS_AF_INET, str, &addr ) == 1)
return addr;
return WS_INADDR_NONE;
}
......
......@@ -945,7 +945,7 @@ static void test_inet_pton(void)
WSASetLastError(0xdeadbeef);
ret = inet_addr(NULL);
ok(ret == INADDR_NONE, "got %#x\n", ret);
todo_wine ok(WSAGetLastError() == WSAEFAULT, "got error %u\n", WSAGetLastError());
ok(WSAGetLastError() == WSAEFAULT, "got error %u\n", WSAGetLastError());
for (i = 0; i < ARRAY_SIZE(ipv4_tests); ++i)
{
......
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