* patch #3966: Create a mh_xmalloc function to prevent mistakes when
[mmh] / uip / mhn.c
index c6d5c77..27ee05b 100644 (file)
--- a/uip/mhn.c
+++ b/uip/mhn.c
@@ -131,8 +131,6 @@ static struct swit switches[] = {
 };
 
 
-extern int errno;
-
 /* mhparse.c */
 extern int checksw;
 extern char *tmp;      /* directory to place temp files */
@@ -244,8 +242,7 @@ main (int argc, char **argv)
      */
     nummsgs = 0;
     maxmsgs = MAXMSGS;
-    if (!(msgs = (char **) malloc ((size_t) (maxmsgs * sizeof(*msgs)))))
-       adios (NULL, "unable to allocate storage");
+    msgs = (char **) mh_xmalloc ((size_t) (maxmsgs * sizeof(*msgs)));
 
     /*
      * Parse arguments