mirror of
https://github.com/reactos/reactos.git
synced 2025-02-23 17:05:46 +00:00
Michael Stefaniuc : kernel32: Pass HEAP_ZERO_MEMORY to HeapAlloc() instead of clearing the memory with a separate memset() call. <mstefani at redhat.de>
svn path=/trunk/; revision=31084
This commit is contained in:
parent
012c324bfb
commit
e936501a0c
1 changed files with 1 additions and 2 deletions
|
@ -168,10 +168,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 = 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;
|
||||
|
|
Loading…
Reference in a new issue