X-Git-Url: http://git.marmaro.de/?p=mmh;a=blobdiff_plain;f=uip%2Frefile.c;h=e50253af5f5ebffba89ba603974a02cb4345ae83;hp=f3c6d1f0ca27fc3315d2c1dac5cae159d240b6de;hb=008837e090c008e3afe7a9c8667070bafa091e62;hpb=a753601a3811c10e433dbb04d8211a3df4b99012 diff --git a/uip/refile.c b/uip/refile.c index f3c6d1f..e50253a 100644 --- a/uip/refile.c +++ b/uip/refile.c @@ -11,6 +11,7 @@ */ #include +#include #include #include @@ -97,8 +98,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 @@ -185,9 +185,8 @@ main (int argc, char **argv) */ if (nummsgs >= maxmsgs) { maxmsgs += MAXMSGS; - if (!(msgs = (char **) realloc (msgs, - (size_t) (maxmsgs * sizeof(*msgs))))) - adios (NULL, "unable to reallocate msgs storage"); + msgs = (char **) mh_xrealloc (msgs, + (size_t) (maxmsgs * sizeof(*msgs))); } msgs[nummsgs++] = cp; }