From 84ad10bfcdc441aaf26c535f3124468e67d734b9 Mon Sep 17 00:00:00 2001 From: Aric Stewart Date: Fri, 31 Oct 2003 04:16:54 +0000 Subject: [PATCH] Switched a + to a - so that it makes sense when marking the last node in the Adapters Info linked list. --- dlls/iphlpapi/iphlpapi_main.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/dlls/iphlpapi/iphlpapi_main.c b/dlls/iphlpapi/iphlpapi_main.c index b19793a3195..2f6c14d5a72 100644 --- a/dlls/iphlpapi/iphlpapi_main.c +++ b/dlls/iphlpapi/iphlpapi_main.c @@ -571,8 +571,10 @@ DWORD WINAPI GetAdaptersInfo(PIP_ADAPTER_INFO pAdapterInfo, PULONG pOutBufLen) ptr->IpAddressList.IpAddress.String); toIPAddressString(getInterfaceMaskByIndex(table->indexes[ndx]), ptr->IpAddressList.IpMask.String); - if (ndx < table->numIndexes + 1) - ptr->Next = (ndx == table->numIndexes - 1) ? NULL : &pAdapterInfo[ndx + 1]; + if (ndx < table->numIndexes - 1) + ptr->Next = &pAdapterInfo[ndx + 1]; + else + ptr->Next = NULL; } ret = NO_ERROR; }