]> git.marmaro.de Git - mmh/blobdiff - uip/refile.c
* patch #3966: Create a mh_xmalloc function to prevent mistakes when
[mmh] / uip / refile.c
index f3c6d1f0ca27fc3315d2c1dac5cae159d240b6de..4d9129155e95c818880d51fed8f741990d60310b 100644 (file)
@@ -11,6 +11,7 @@
  */
 
 #include <h/mh.h>
  */
 
 #include <h/mh.h>
+#include <h/utils.h>
 #include <fcntl.h>
 #include <errno.h>
 
 #include <fcntl.h>
 #include <errno.h>
 
@@ -97,8 +98,7 @@ main (int argc, char **argv)
      */
     nummsgs = 0;
     maxmsgs = MAXMSGS;
      */
     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
 
     /*
      * Parse arguments