]> diplodocus.org Git - nmh/blobdiff - uip/mhparse.c
Put parameter names in h/utils.h memory function prototypes.
[nmh] / uip / mhparse.c
index 40fe61d5f8fe69c95438cd145abc481a6b576044..7e539c3a8eabc276a0cd1720b2c6dcec4cac8172 100644 (file)
@@ -294,9 +294,7 @@ get_content (FILE *in, char *file, int toplevel)
     m_getfld_state_t gstate = 0;
 
     /* allocate the content structure */
-    if (!(ct = (CT) mh_xcalloc (1, sizeof(*ct))))
-       adios (NULL, "out of memory");
-
+    ct = mh_xcalloc(1, sizeof *ct);
     ct->c_fp = in;
     ct->c_file = add (file, NULL);
     ct->c_begin = ftell (ct->c_fp) + 1;
@@ -1029,8 +1027,7 @@ InitText (CT ct)
     ct->c_subtype = ct_str_subtype (CT_TEXT, ci->ci_subtype);
 
     /* allocate text character set structure */
-    if ((t = (struct text *) mh_xcalloc (1, sizeof(*t))) == NULL)
-       adios (NULL, "out of memory");
+    t = mh_xcalloc(1, sizeof *t);
     ct->c_ctparams = (void *) t;
 
     /* scan for charset parameter */
@@ -1134,8 +1131,7 @@ InitMultiPart (CT ct)
     }
 
     /* allocate primary structure for multipart info */
-    if ((m = (struct multipart *) mh_xcalloc (1, sizeof(*m))) == NULL)
-       adios (NULL, "out of memory");
+    m = mh_xcalloc(1, sizeof *m);
     ct->c_ctparams = (void *) m;
 
     /* check if boundary parameter contains only whitespace characters */
@@ -1179,8 +1175,7 @@ InitMultiPart (CT ct)
            if (strcmp (bufp + 2, m->mp_start))
                continue;
 next_part:
-           if ((part = (struct part *) mh_xcalloc (1, sizeof(*part))) == NULL)
-               adios (NULL, "out of memory");
+           part = mh_xcalloc(1, sizeof *part);
            *next = part;
            next = &part->mp_next;
 
@@ -1419,8 +1414,7 @@ InitMessage (CT ct)
                PM pm;
                struct partial *p;
 
-               if ((p = (struct partial *) mh_xcalloc (1, sizeof(*p))) == NULL)
-                   adios (NULL, "out of memory");
+               p = mh_xcalloc(1, sizeof *p);
                ct->c_ctparams = (void *) p;
 
                /* scan for parameters "id", "number", and "total" */
@@ -1468,8 +1462,7 @@ invalid_param:
                CT p;
                FILE *fp;
 
-               if ((e = (struct exbody *) mh_xcalloc (1, sizeof(*e))) == NULL)
-                   adios (NULL, "out of memory");
+               e = mh_xcalloc(1, sizeof *e);
                ct->c_ctparams = (void *) e;
 
                if (!ct->c_fp