mem_calloc -> p_new
[apps/madmutt.git] / sendlib.c
index 0dca3d5..e1c8a3d 100644 (file)
--- a/sendlib.c
+++ b/sendlib.c
@@ -618,10 +618,10 @@ static size_t convert_file_to (FILE * file, const char *fromcode,
   if (cd1 == (iconv_t) (-1))
     return -1;
 
-  cd = mem_calloc (ncodes, sizeof (iconv_t));
-  score = mem_calloc (ncodes, sizeof (size_t));
-  states = mem_calloc (ncodes, sizeof (CONTENT_STATE));
-  infos = mem_calloc (ncodes, sizeof (CONTENT));
+  cd = p_new(iconv_t, ncodes);
+  score = p_new(size_t, ncodes);
+  states = p_new(CONTENT_STATE, ncodes);
+  infos = p_new(CONTENT, ncodes);
 
   for (i = 0; i < ncodes; i++)
     if (ascii_strcasecmp (tocodes[i], "UTF-8"))
@@ -833,7 +833,7 @@ CONTENT *mutt_get_content_info (const char *fname, BODY * b)
     return (NULL);
   }
 
-  info = mem_calloc (1, sizeof (CONTENT));
+  info = p_new(CONTENT, 1);
   memset (&state, 0, sizeof (state));
 
   if (b != NULL && b->type == TYPETEXT && (!b->noconv && !b->force_charset)) {