mirror of
https://github.com/netsurf-browser/netsurf
synced 2025-01-18 16:49:18 +03:00
Correct some memory allocation parameters
This commit is contained in:
parent
ade86e496e
commit
20dabacb25
@ -3268,7 +3268,7 @@ struct gui_window *gui_create_browser_window(struct browser_window *bw,
|
||||
g->shared->tabs=1;
|
||||
g->shared->next_tab=1;
|
||||
|
||||
g->shared->svbuffer = AllocVecTagList(2000, NULL);
|
||||
g->shared->svbuffer = AllocVecTags(2000, AVT_ClearWithValue, 0, TAG_DONE);
|
||||
|
||||
g->shared->helphints[GID_BACK] =
|
||||
translate_escape_chars(messages_get("HelpToolbarBack"));
|
||||
|
@ -188,7 +188,7 @@ void ami_init_menulabs(struct gui_window_2 *gwin)
|
||||
{
|
||||
int i;
|
||||
|
||||
gwin->menutype = AllocVecTagList(AMI_MENU_AREXX_MAX + 1, NULL);
|
||||
gwin->menutype = AllocVecTags(AMI_MENU_AREXX_MAX + 1, AVT_ClearWithValue, 0, TAG_DONE);
|
||||
|
||||
for(i=0;i <= AMI_MENU_AREXX_MAX;i++)
|
||||
{
|
||||
@ -458,7 +458,8 @@ struct NewMenu *ami_create_menu(struct gui_window_2 *gwin)
|
||||
{
|
||||
int i;
|
||||
|
||||
gwin->menu = AllocVecTagList(sizeof(struct NewMenu) * (AMI_MENU_AREXX_MAX + 1), NULL); /* NB: Was not MEMF_PRIVATE */
|
||||
gwin->menu = AllocVecTags(sizeof(struct NewMenu) * (AMI_MENU_AREXX_MAX + 1),
|
||||
AVT_ClearWithValue, 0, TAG_DONE);
|
||||
ami_init_menulabs(gwin);
|
||||
ami_menu_scan(ami_tree_get_tree(hotlist_window), gwin);
|
||||
ami_menu_arexx_scan(gwin);
|
||||
|
@ -41,7 +41,7 @@ struct nsObject *AddObject(struct MinList *objlist, ULONG otype)
|
||||
{
|
||||
struct nsObject *dtzo;
|
||||
|
||||
dtzo = (struct nsObject *)AllocVecTagList(sizeof(struct nsObject), NULL);
|
||||
dtzo = (struct nsObject *)AllocVecTags(sizeof(struct nsObject), AVT_ClearWithValue, 0, TAG_DONE);
|
||||
|
||||
AddTail((struct List *)objlist,(struct Node *)dtzo);
|
||||
|
||||
|
@ -377,7 +377,8 @@ void ami_tree_menu(struct treeview_window *twin)
|
||||
{
|
||||
if(twin->menu) return;
|
||||
|
||||
if(twin->menu = AllocVecTagList(sizeof(struct NewMenu) * AMI_TREE_MENU_ITEMS, NULL)) /* NB: Was not MEMF_PRIVATE */
|
||||
if(twin->menu = AllocVecTags(sizeof(struct NewMenu) * AMI_TREE_MENU_ITEMS,
|
||||
AVT_ClearWithValue, 0, TAG_DONE))
|
||||
{
|
||||
twin->menu[0].nm_Type = NM_TITLE;
|
||||
twin->menu_name[0] = ami_utf8_easy((char *)messages_get("Tree"));
|
||||
|
Loading…
Reference in New Issue
Block a user