]> diplodocus.org Git - nmh/blobdiff - uip/mhlist.c
Alter HasSuffixC()'s char * to be const.
[nmh] / uip / mhlist.c
index 34655236e4287b146cb786b5980c1c3dcb54f75c..13439c6271d4f3cb1e093165aaa4e3519d8d6764 100644 (file)
@@ -266,8 +266,7 @@ do_cache:
      * check if message is coming from file
      */
     if (file) {
      * check if message is coming from file
      */
     if (file) {
-       if (!(cts = (CT *) mh_xcalloc ((size_t) 2, sizeof(*cts))))
-           adios (NULL, "out of memory");
+       cts = mh_xcalloc(2, sizeof *cts);
        ctp = cts;
 
        if ((ct = parse_mime (file)))
        ctp = cts;
 
        if ((ct = parse_mime (file)))
@@ -299,8 +298,7 @@ do_cache:
                done (1);
        seq_setprev (mp);       /* set the previous-sequence */
 
                done (1);
        seq_setprev (mp);       /* set the previous-sequence */
 
-       if (!(cts = (CT *) mh_xcalloc ((size_t) (mp->numsel + 1), sizeof(*cts))))
-           adios (NULL, "out of memory");
+       cts = mh_xcalloc(mp->numsel + 1, sizeof *cts);
        ctp = cts;
 
        for (msgnum = mp->lowsel; msgnum <= mp->hghsel; msgnum++) {
        ctp = cts;
 
        for (msgnum = mp->lowsel; msgnum <= mp->hghsel; msgnum++) {
@@ -345,7 +343,7 @@ do_cache:
     for (ctp = cts; *ctp; ctp++)
        free_content (*ctp);
 
     for (ctp = cts; *ctp; ctp++)
        free_content (*ctp);
 
-    free ((char *) cts);
+    free(cts);
     cts = NULL;
 
     /* If reading from a folder, do some updating */
     cts = NULL;
 
     /* If reading from a folder, do some updating */