[PATCH 2/5] iphlpapi: Use ConvertInterfaceIndexToLuid() where possible.
Huw Davies
huw at codeweavers.com
Fri Jul 2 03:41:33 CDT 2021
Signed-off-by: Huw Davies <huw at codeweavers.com>
---
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;
--
2.23.0
More information about the wine-devel
mailing list