X-Git-Url: http://git.madism.org/?a=blobdiff_plain;f=browser.c;h=5baa3b78c6af4edfea0dd4ae030b010ea3a5f8ac;hb=b3cb6ed8d36c550a2e589910ce51bbc8352ff57c;hp=ff4dc3df2e581caa9db7d895791899bf91204b41;hpb=8e037c67a88cb4680c4391134c578e3b55a80f8a;p=apps%2Fmadmutt.git diff --git a/browser.c b/browser.c index ff4dc3d..5baa3b7 100644 --- a/browser.c +++ b/browser.c @@ -463,9 +463,7 @@ static void init_state (struct browser_state *state, MUTTMENU * menu) { state->entrylen = 0; state->entrymax = 256; - state->entry = - (struct folder_file *) mem_calloc (state->entrymax, - sizeof (struct folder_file)); + state->entry = p_new(struct folder_file, state->entrymax); #ifdef USE_IMAP state->imap_browse = 0; #endif @@ -1005,7 +1003,7 @@ void _mutt_select_file (char *f, size_t flen, int flags, char ***files, if (menu->tagged) { *numfiles = menu->tagged; - tfiles = mem_calloc (*numfiles, sizeof (char *)); + tfiles = p_new(char *, *numfiles); for (i = 0, j = 0; i < state.entrylen; i++) { struct folder_file ff = state.entry[i]; char full[_POSIX_PATH_MAX]; @@ -1020,7 +1018,7 @@ void _mutt_select_file (char *f, size_t flen, int flags, char ***files, } else if (f[0]) { /* no tagged entries. return selected entry */ *numfiles = 1; - tfiles = mem_calloc (*numfiles, sizeof (char *)); + tfiles = p_new(char *, *numfiles); mutt_expand_path (f, flen); tfiles[0] = str_dup (f); *files = tfiles;