iphlpapi: Update the buffer size only if required in GetAdaptersAddresses.
This commit is contained in:
parent
a49668e8bc
commit
708ab4ca12
|
@ -1382,8 +1382,10 @@ ULONG WINAPI DECLSPEC_HOTPATCH GetAdaptersAddresses(ULONG family, ULONG flags, P
|
|||
ret = ERROR_SUCCESS;
|
||||
}
|
||||
else
|
||||
{
|
||||
ret = ERROR_BUFFER_OVERFLOW;
|
||||
*buflen = total_size;
|
||||
*buflen = total_size;
|
||||
}
|
||||
|
||||
TRACE("num adapters %u\n", table->numIndexes);
|
||||
HeapFree(GetProcessHeap(), 0, table);
|
||||
|
|
|
@ -1338,7 +1338,6 @@ static void test_GetAdaptersAddresses(void)
|
|||
ptr = HeapAlloc(GetProcessHeap(), 0, osize);
|
||||
ret = pGetAdaptersAddresses(AF_UNSPEC, 0, NULL, ptr, &osize);
|
||||
ok(!ret, "expected ERROR_SUCCESS got %u\n", ret);
|
||||
todo_wine
|
||||
ok(osize == size, "expected %d, got %d\n", size, osize);
|
||||
|
||||
for (aa = ptr; !ret && aa; aa = aa->Next)
|
||||
|
|
Loading…
Reference in New Issue