projects
/
apps
/
madmutt.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
mem_calloc -> p_new
[apps/madmutt.git]
/
browser.c
diff --git
a/browser.c
b/browser.c
index
ff4dc3d
..
5baa3b7
100644
(file)
--- 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->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
#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;
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];
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;
}
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;
mutt_expand_path (f, flen);
tfiles[0] = str_dup (f);
*files = tfiles;