diff options
author | Chris Young <chris@unsatisfactorysoftware.co.uk> | 2016-11-19 20:44:17 +0000 |
---|---|---|
committer | Chris Young <chris@unsatisfactorysoftware.co.uk> | 2016-11-19 20:44:17 +0000 |
commit | a8bd2af7103bca7145f8c566ec46f27e2be8d182 (patch) | |
tree | 2c14d8d3402e7799b161852676dc8698310ed59f /frontends/amiga/file.c | |
parent | 81a7e0cbe9851c2388e53950a6db3e75b1156ead (diff) | |
download | netsurf-a8bd2af7103bca7145f8c566ec46f27e2be8d182.tar.gz netsurf-a8bd2af7103bca7145f8c566ec46f27e2be8d182.tar.bz2 |
More allocvec/malloc replacements
Diffstat (limited to 'frontends/amiga/file.c')
-rw-r--r-- | frontends/amiga/file.c | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/frontends/amiga/file.c b/frontends/amiga/file.c index db0e7162b..04f8e8aca 100644 --- a/frontends/amiga/file.c +++ b/frontends/amiga/file.c @@ -40,7 +40,6 @@ #include "amiga/filetype.h" #include "amiga/icon.h" #include "amiga/iff_dr2d.h" -#include "amiga/memory.h" #include "amiga/misc.h" #include "amiga/save_pdf.h" #include "amiga/theme.h" @@ -90,7 +89,7 @@ void ami_file_open(struct gui_window_2 *gwin) ASLFR_FilterFunc, &aslhookfunc, TAG_DONE)) { - if((temp = AllocVecTagList(1024, NULL))) + if((temp = malloc(1024))) { strlcpy(temp, filereq->fr_Drawer, 1024); AddPart(temp, filereq->fr_File, 1024); @@ -108,7 +107,7 @@ void ami_file_open(struct gui_window_2 *gwin) nsurl_unref(url); } - FreeVec(temp); + free(temp); } } } @@ -213,7 +212,7 @@ void ami_file_save(int type, char *fname, struct Window *win, void ami_file_save_req(int type, struct gui_window_2 *gwin, struct hlcache_handle *object) { - char *fname = AllocVecTagList(1024, NULL); + char *fname = malloc(1024); char *initial_fname = NULL; char *fname_with_ext = NULL; bool strip_ext = true; @@ -224,7 +223,7 @@ void ami_file_save_req(int type, struct gui_window_2 *gwin, } if(initial_fname != NULL) { - fname_with_ext = AllocVecTagList(strlen(initial_fname) + 5, NULL); /* 5 = .ext\0 */ + fname_with_ext = malloc(strlen(initial_fname) + 5); /* 5 = .ext\0 */ strcpy(fname_with_ext, initial_fname); @@ -261,8 +260,8 @@ void ami_file_save_req(int type, struct gui_window_2 *gwin, ami_file_save(type, fname, gwin->win, object, gwin->gw->favicon, gwin->gw->bw); } - if(fname) FreeVec(fname); - if(fname_with_ext) FreeVec(fname_with_ext); + if(fname) free(fname); + if(fname_with_ext) free(fname_with_ext); } void ami_file_req_init(void) |