Commit d457af74 authored by Michael Stefaniuc's avatar Michael Stefaniuc Committed by Alexandre Julliard

kernel32: Pass HEAP_ZERO_MEMORY to HeapAlloc() instead of clearing the memory…

kernel32: Pass HEAP_ZERO_MEMORY to HeapAlloc() instead of clearing the memory with a separate memset() call.
parent d117938f
......@@ -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;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment