[ros-diffs] [cwittich] 31084: Michael Stefaniuc : kernel32: Pass HEAP_ZERO_MEMORY to HeapAlloc() instead of clearing the memory with a separate memset() call. <mstefani at redhat.de>

cwittich at svn.reactos.org cwittich at svn.reactos.org
Sat Dec 8 17:33:06 CET 2007


Author: cwittich
Date: Sat Dec  8 19:33:05 2007
New Revision: 31084

URL: http://svn.reactos.org/svn/reactos?rev=31084&view=rev
Log:
Michael Stefaniuc : kernel32: Pass HEAP_ZERO_MEMORY to HeapAlloc() instead of clearing the memory with a separate memset() call. <mstefani at redhat.de>

Modified:
    trunk/reactos/dll/win32/kernel32/misc/lzexpand_main.c

Modified: trunk/reactos/dll/win32/kernel32/misc/lzexpand_main.c
URL: http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/kernel32/misc/lzexpand_main.c?rev=31084&r1=31083&r2=31084&view=diff
==============================================================================
--- trunk/reactos/dll/win32/kernel32/misc/lzexpand_main.c (original)
+++ trunk/reactos/dll/win32/kernel32/misc/lzexpand_main.c Sat Dec  8 19:33:05 2007
@@ -168,10 +168,9 @@
 	}
         for (i = 0; i < MAX_LZSTATES; i++) if (!lzstates[i]) break;
         if (i == MAX_LZSTATES) return LZERROR_GLOBALLOC;
-	lzstates[i] = lzs = RtlAllocateHeap( GetProcessHeap(), 0, sizeof(struct lzstate) );
+	lzstates[i] = lzs = RtlAllocateHeap( GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(struct lzstate) );
 	if(lzs == NULL) return LZERROR_GLOBALLOC;
 
-	memset(lzs,'\0',sizeof(*lzs));
 	lzs->realfd	= hfSrc;
 	lzs->lastchar	= head.lastchar;
 	lzs->reallength = head.reallength;




More information about the Ros-diffs mailing list