Module: wine Branch: master Commit: 7bdd9894f43be40bfa6654c1a18f3c8ddbafd616 URL: https://source.winehq.org/git/wine.git/?a=commit;h=7bdd9894f43be40bfa6654c1a...
Author: Huw Davies huw@codeweavers.com Date: Fri Jul 2 09:41:33 2021 +0100
iphlpapi: Use ConvertInterfaceIndexToLuid() where possible.
Signed-off-by: Huw Davies huw@codeweavers.com Signed-off-by: Alexandre Julliard julliard@winehq.org
---
dlls/iphlpapi/iphlpapi_main.c | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-)
diff --git a/dlls/iphlpapi/iphlpapi_main.c b/dlls/iphlpapi/iphlpapi_main.c index 7b104330ba7..a774e60c3d9 100644 --- a/dlls/iphlpapi/iphlpapi_main.c +++ b/dlls/iphlpapi/iphlpapi_main.c @@ -1052,8 +1052,7 @@ static ULONG adapterAddressesFromIndex(ULONG family, ULONG flags, IF_INDEX index aa->PhysicalAddressLength = buflen; aa->IfType = typeFromMibType(type); aa->ConnectionType = connectionTypeFromMibType(type); - aa->Luid.Info.NetLuidIndex = index; - aa->Luid.Info.IfType = aa->IfType; + ConvertInterfaceIndexToLuid( index, &aa->Luid );
if (output_gateways && num_v4_gateways) { @@ -1796,10 +1795,8 @@ DWORD WINAPI GetIfEntry2( MIB_IF_ROW2 *row2 ) if ((ret = getInterfaceStatsByName( name, &row ))) return ret;
memset( row2, 0, sizeof(*row2) ); - row2->InterfaceLuid.Info.Reserved = 0; - row2->InterfaceLuid.Info.NetLuidIndex = row.dwIndex; - row2->InterfaceLuid.Info.IfType = row.dwType; row2->InterfaceIndex = row.dwIndex; + ConvertInterfaceIndexToLuid( row2->InterfaceIndex, &row2->InterfaceLuid ); ConvertInterfaceLuidToGuid( &row2->InterfaceLuid, &row2->InterfaceGuid ); row2->Type = row.dwType; row2->Mtu = row.dwMtu;