mem_calloc -> p_new
[apps/madmutt.git] / thread.c
index 57b1bcb..f64dc3f 100644 (file)
--- a/thread.c
+++ b/thread.c
@@ -346,7 +346,7 @@ static LIST *make_subject_list (THREAD * cur, time_t * dateptr)
           break;
       }
       if (!curlist || rc > 0) {
-        newlist = mem_calloc (1, sizeof (LIST));
+        newlist = p_new(LIST, 1);
         newlist->data = env->real_subj;
         if (oldlist) {
           newlist->next = oldlist->next;
@@ -549,7 +549,7 @@ THREAD *mutt_sort_subthreads (THREAD * thread, int init)
 
   top = thread;
 
-  array = mem_calloc ((array_size = 256), sizeof (THREAD *));
+  array = p_new(THREAD *, (array_size = 256));
   while (1) {
     if (init || !thread->sort_key) {
       thread->sort_key = NULL;
@@ -758,7 +758,7 @@ void mutt_sort_threads (CONTEXT * ctx, int init)
       else {
         new = (option (OPTDUPTHREADS) ? thread : NULL);
 
-        thread = mem_calloc (1, sizeof (THREAD));
+        thread = p_new(THREAD, 1);
         thread->message = cur;
         thread->check_subject = 1;
         cur->thread = thread;
@@ -839,7 +839,7 @@ void mutt_sort_threads (CONTEXT * ctx, int init)
         break;
 
       if ((new = hash_find (ctx->thread_hash, ref->data)) == NULL) {
-        new = mem_calloc (1, sizeof (THREAD));
+        new = p_new(THREAD, 1);
         hash_insert (ctx->thread_hash, ref->data, new, 1);
       }
       else {