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

This commit is contained in:
Kirill K. Smirnov 2007-12-03 21:28:16 +04:00 committed by Alexandre Julliard
parent da32b24508
commit a9491cf0cd
1 changed files with 2 additions and 18 deletions

View File

@ -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;
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->prev = NULL;
hlpfile->next = first_hlpfile;
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);
first_hlpfile = hlpfile;