projects
/
apps
/
madmutt.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
exit mem_realloc, enters p_realloc/xrealloc.
[apps/madmutt.git]
/
mh.c
diff --git
a/mh.c
b/mh.c
index
90cf30a
..
8c9bbc7
100644
(file)
--- a/
mh.c
+++ b/
mh.c
@@
-29,7
+29,6
@@
#include "thread.h"
#include "hcache.h"
#include "thread.h"
#include "hcache.h"
-#include "lib/mem.h"
#include "lib/intl.h"
#include "lib/str.h"
#include "lib/debug.h"
#include "lib/intl.h"
#include "lib/str.h"
#include "lib/debug.h"
@@
-85,7
+84,7
@@
static void mhs_alloc (struct mh_sequences *mhs, int i)
if (i > mhs->max || !mhs->flags) {
newmax = i + 128;
if (i > mhs->max || !mhs->flags) {
newmax = i + 128;
-
mem_realloc (&mhs->flags, sizeof (mhs->flags[0]) * (newmax + 1)
);
+
p_realloc(&mhs->flags, newmax + 1
);
for (j = mhs->max + 1; j <= newmax; j++)
mhs->flags[j] = 0;
for (j = mhs->max + 1; j <= newmax; j++)
mhs->flags[j] = 0;
@@
-646,7
+645,7
@@
static int maildir_parse_entry (CONTEXT * ctx, struct maildir ***last,
else
h->path = str_dup (fname);
else
h->path = str_dup (fname);
- entry =
mem_calloc (sizeof (struct maildir)
, 1);
+ entry =
p_new(struct maildir
, 1);
entry->h = h;
entry->header_parsed = (ctx->magic == M_MH);
#ifdef USE_INODESORT
entry->h = h;
entry->header_parsed = (ctx->magic == M_MH);
#ifdef USE_INODESORT
@@
-1978,7
+1977,7
@@
static int maildir_is_magic (const char* path, struct stat* st) {
/* routines common to maildir and mh */
static mx_t* reg_mx (void) {
/* routines common to maildir and mh */
static mx_t* reg_mx (void) {
- mx_t* fmt =
mem_calloc (1, sizeof (mx_t)
);
+ mx_t* fmt =
p_new(mx_t, 1
);
fmt->local = 1;
fmt->mx_access = access;
fmt->mx_sync_mailbox = mh_sync_mailbox;
fmt->local = 1;
fmt->mx_access = access;
fmt->mx_sync_mailbox = mh_sync_mailbox;