mem_calloc -> p_new
[apps/madmutt.git] / mbox.c
diff --git a/mbox.c b/mbox.c
index 030b55b..7a5d875 100644 (file)
--- a/mbox.c
+++ b/mbox.c
@@ -646,8 +646,8 @@ static int _mbox_sync_mailbox (CONTEXT * ctx, int unused, int *index_hint)
     offset -= (sizeof MMDF_SEP - 1);
 
   /* allocate space for the new offsets */
-  newOffset = mem_calloc (ctx->msgcount - first, sizeof (struct m_update_t));
-  oldOffset = mem_calloc (ctx->msgcount - first, sizeof (struct m_update_t));
+  newOffset = p_new(struct m_update_t, ctx->msgcount - first);
+  oldOffset = p_new(struct m_update_t, ctx->msgcount - first);
 
   for (i = first, j = 0; i < ctx->msgcount; i++) {
     /*
@@ -1140,7 +1140,7 @@ static int mmdf_commit_message (MESSAGE* msg, CONTEXT* ctx) {
 }
 
 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_check_empty = mbox_check_empty;
   fmt->mx_is_magic = mbox_is_magic;