mem_calloc -> p_new
[apps/madmutt.git] / query.c
diff --git a/query.c b/query.c
index 893d2db..ba3a5a4 100644 (file)
--- a/query.c
+++ b/query.c
@@ -102,11 +102,11 @@ static QUERY *run_query (char *s, int quiet)
       if (first == NULL) {
         FirstColumn = 0;
         SecondColumn = 0;
-        first = (QUERY *) mem_calloc (1, sizeof (QUERY));
+        first = p_new(QUERY, 1);
         cur = first;
       }
       else {
-        cur->next = (QUERY *) mem_calloc (1, sizeof (QUERY));
+        cur->next = p_new(QUERY, 1);
         cur = cur->next;
       }
 
@@ -289,8 +289,7 @@ static void query_menu (char *buf, size_t buflen, QUERY * results, int retbuf)
     for (queryp = results; queryp; queryp = queryp->next)
       menu->max++;
 
-    menu->data = QueryTable =
-      (ENTRY *) mem_calloc (menu->max, sizeof (ENTRY));
+    menu->data = QueryTable = p_new(ENTRY, menu->max);
 
     for (i = 0, queryp = results; queryp; queryp = queryp->next, i++)
       QueryTable[i].data = queryp;
@@ -346,8 +345,7 @@ static void query_menu (char *buf, size_t buflen, QUERY * results, int retbuf)
               menu->max++;
 
             if (op == OP_QUERY) {
-              menu->data = QueryTable =
-                (ENTRY *) mem_calloc (menu->max, sizeof (ENTRY));
+              menu->data = QueryTable = p_new(ENTRY, menu->max);
 
               for (i = 0, queryp = results; queryp;
                    queryp = queryp->next, i++)