Juan Lang : iphlpapi: Avoid HEAP_ZERO_MEMORY where it isn't needed.

Alexandre Julliard julliard at winehq.org
Fri Nov 16 08:31:19 CST 2007


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

Author: Juan Lang <juan.lang at gmail.com>
Date:   Thu Nov 15 11:07:27 2007 -0800

iphlpapi: Avoid HEAP_ZERO_MEMORY where it isn't needed.

---

 dlls/iphlpapi/ifenum.c |    6 ++++--
 1 files changed, 4 insertions(+), 2 deletions(-)

diff --git a/dlls/iphlpapi/ifenum.c b/dlls/iphlpapi/ifenum.c
index 36c42fe..2929b70 100644
--- a/dlls/iphlpapi/ifenum.c
+++ b/dlls/iphlpapi/ifenum.c
@@ -211,8 +211,9 @@ InterfaceIndexTable *getInterfaceIndexTable(void)
       numInterfaces++;
     if (numInterfaces > 1)
       size += (numInterfaces - 1) * sizeof(DWORD);
-    ret = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, size);
+    ret = HeapAlloc(GetProcessHeap(), 0, size);
     if (ret) {
+      ret->numIndexes = 0;
       for (p = indexes; p && p->if_name; p++)
         ret->indexes[ret->numIndexes++] = p->if_index;
     }
@@ -241,8 +242,9 @@ InterfaceIndexTable *getNonLoopbackInterfaceIndexTable(void)
           numInterfaces++;
       if (numInterfaces > 1)
         size += (numInterfaces - 1) * sizeof(DWORD);
-      ret = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, size);
+      ret = HeapAlloc(GetProcessHeap(), 0, size);
       if (ret) {
+        ret->numIndexes = 0;
         for (p = indexes; p && p->if_name; p++)
           if (!isLoopbackInterface(fd, p->if_name))
             ret->indexes[ret->numIndexes++] = p->if_index;




More information about the wine-cvs mailing list