Juan Lang : iphlpapi: UINT and DWORD are now equivalent, even in 64-bit compiles, so remove unnecessary complication.

Alexandre Julliard julliard at winehq.org
Mon Oct 15 11:28:09 CDT 2007


Module: wine
Branch: master
Commit: bceab86d351fbcb37baf9c0ad194b7c4265f151a
URL:    http://source.winehq.org/git/wine.git/?a=commit;h=bceab86d351fbcb37baf9c0ad194b7c4265f151a

Author: Juan Lang <juan.lang at gmail.com>
Date:   Sat Oct 13 16:25:36 2007 -0700

iphlpapi: UINT and DWORD are now equivalent, even in 64-bit compiles, so remove unnecessary complication.

---

 dlls/iphlpapi/iphlpapi_main.c |   11 +++--------
 1 files changed, 3 insertions(+), 8 deletions(-)

diff --git a/dlls/iphlpapi/iphlpapi_main.c b/dlls/iphlpapi/iphlpapi_main.c
index 858437d..d1ef762 100644
--- a/dlls/iphlpapi/iphlpapi_main.c
+++ b/dlls/iphlpapi/iphlpapi_main.c
@@ -722,19 +722,14 @@ DWORD WINAPI GetAdaptersInfo(PIP_ADAPTER_INFO pAdapterInfo, PULONG pOutBufLen)
             }
             for (ndx = 0; ndx < table->numIndexes; ndx++) {
               PIP_ADAPTER_INFO ptr = &pAdapterInfo[ndx];
-              DWORD addrLen = sizeof(ptr->Address), type, i;
+              DWORD i;
               PIP_ADDR_STRING currentIPAddr = &ptr->IpAddressList;
               BOOL firstIPAddr = TRUE;
 
               /* on Win98 this is left empty, but whatever */
               getInterfaceNameByIndex(table->indexes[ndx], ptr->AdapterName);
-              getInterfacePhysicalByIndex(table->indexes[ndx], &addrLen,
-               ptr->Address, &type);
-              /* MS defines address length and type as UINT in some places and
-                 DWORD in others, **sigh**.  Don't want to assume that PUINT and
-                 PDWORD are equiv (64-bit?) */
-              ptr->AddressLength = addrLen;
-              ptr->Type = type;
+              getInterfacePhysicalByIndex(table->indexes[ndx],
+               &ptr->AddressLength, ptr->Address, &ptr->Type);
               ptr->Index = table->indexes[ndx];
               for (i = 0; i < ipAddrTable->dwNumEntries; i++) {
                 if (ipAddrTable->table[i].dwIndex == ptr->Index) {




More information about the wine-cvs mailing list