From d457af740d510cc18764ec538d2cada011b32588 Mon Sep 17 00:00:00 2001 From: Michael Stefaniuc Date: Wed, 5 Dec 2007 21:52:41 +0100 Subject: [PATCH] kernel32: Pass HEAP_ZERO_MEMORY to HeapAlloc() instead of clearing the memory with a separate memset() call. --- dlls/kernel32/lzexpand.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/dlls/kernel32/lzexpand.c b/dlls/kernel32/lzexpand.c index b44673656c6..0b81bf84c0a 100644 --- a/dlls/kernel32/lzexpand.c +++ b/dlls/kernel32/lzexpand.c @@ -192,10 +192,9 @@ HFILE WINAPI LZInit( HFILE hfSrc ) } for (i = 0; i < MAX_LZSTATES; i++) if (!lzstates[i]) break; if (i == MAX_LZSTATES) return LZERROR_GLOBALLOC; - lzstates[i] = lzs = HeapAlloc( GetProcessHeap(), 0, sizeof(struct lzstate) ); + lzstates[i] = lzs = HeapAlloc( GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(*lzs) ); if(lzs == NULL) return LZERROR_GLOBALLOC; - memset(lzs,'\0',sizeof(*lzs)); lzs->realfd = hfSrc; lzs->lastchar = head.lastchar; lzs->reallength = head.reallength;