Commit a9491cf0 authored by Kirill K. Smirnov's avatar Kirill K. Smirnov Committed by Alexandre Julliard

winhelp: Use HEAP_ZERO_MEMORY instead of setting individual fields to zero.

parent da32b245
...@@ -284,31 +284,15 @@ HLPFILE *HLPFILE_ReadHlpFile(LPCSTR lpszPath) ...@@ -284,31 +284,15 @@ HLPFILE *HLPFILE_ReadHlpFile(LPCSTR lpszPath)
} }
} }
hlpfile = HeapAlloc(GetProcessHeap(), 0, sizeof(HLPFILE) + lstrlen(lpszPath) + 1); hlpfile = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY,
sizeof(HLPFILE) + lstrlen(lpszPath) + 1);
if (!hlpfile) return 0; if (!hlpfile) return 0;
hlpfile->lpszPath = (char*)hlpfile + sizeof(HLPFILE); hlpfile->lpszPath = (char*)hlpfile + sizeof(HLPFILE);
hlpfile->lpszTitle = NULL;
hlpfile->lpszCopyright = NULL;
hlpfile->first_page = NULL;
hlpfile->first_macro = NULL;
hlpfile->Context = NULL;
hlpfile->wMapLen = 0;
hlpfile->Map = NULL;
hlpfile->contents_start = 0xFFFFFFFF; hlpfile->contents_start = 0xFFFFFFFF;
hlpfile->prev = NULL;
hlpfile->next = first_hlpfile; hlpfile->next = first_hlpfile;
hlpfile->wRefCount = 1; hlpfile->wRefCount = 1;
hlpfile->numBmps = 0;
hlpfile->bmps = NULL;
hlpfile->numFonts = 0;
hlpfile->fonts = NULL;
hlpfile->numWindows = 0;
hlpfile->windows = NULL;
strcpy(hlpfile->lpszPath, lpszPath); strcpy(hlpfile->lpszPath, lpszPath);
first_hlpfile = hlpfile; first_hlpfile = hlpfile;
......
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