Correct some memory allocation parameters

This commit is contained in:
Chris Young 2013-10-12 13:43:33 +01:00
parent ade86e496e
commit 20dabacb25
4 changed files with 7 additions and 5 deletions

View File

@ -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"));

View File

@ -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);

View File

@ -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);

View File

@ -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"));