iphlpapi: Avoid an uninitialized variable warning.

This commit is contained in:
Alexandre Julliard 2014-10-24 13:42:37 +09:00
parent 794d52273e
commit c7924e530d
1 changed files with 2 additions and 2 deletions

View File

@ -1251,7 +1251,7 @@ ULONG WINAPI DECLSPEC_HOTPATCH GetAdaptersAddresses(ULONG family, ULONG flags, P
PIP_ADAPTER_ADDRESSES aa, PULONG buflen) PIP_ADAPTER_ADDRESSES aa, PULONG buflen)
{ {
InterfaceIndexTable *table; InterfaceIndexTable *table;
ULONG i, size, dns_server_size, dns_suffix_size, total_size, ret = ERROR_NO_DATA; ULONG i, size, dns_server_size = 0, dns_suffix_size, total_size, ret = ERROR_NO_DATA;
TRACE("(%d, %08x, %p, %p, %p)\n", family, flags, reserved, aa, buflen); TRACE("(%d, %08x, %p, %p, %p)\n", family, flags, reserved, aa, buflen);
@ -1308,7 +1308,7 @@ ULONG WINAPI DECLSPEC_HOTPATCH GetAdaptersAddresses(ULONG family, ULONG flags, P
size = bytes_left -= size; size = bytes_left -= size;
} }
} }
if (!(flags & GAA_FLAG_SKIP_DNS_SERVER) && dns_server_size) if (dns_server_size)
{ {
firstDns = (PIP_ADAPTER_DNS_SERVER_ADDRESS)((BYTE *)first_aa + total_size - dns_server_size - dns_suffix_size); firstDns = (PIP_ADAPTER_DNS_SERVER_ADDRESS)((BYTE *)first_aa + total_size - dns_server_size - dns_suffix_size);
get_dns_server_addresses(firstDns, &dns_server_size); get_dns_server_addresses(firstDns, &dns_server_size);