X-Git-Url: http://git.marmaro.de/?p=mmh;a=blobdiff_plain;f=uip%2Fscansbr.c;h=b178e75955a5944a0d226366e0894ae625b9c0a2;hp=be68bf89162fb5c7c53ee761adaa7d8f10bcc623;hb=81a21a9a97d8633f6d6231e31fdb6e328d0d3ff2;hpb=582d618b69077087961c367bd1631495906c92a8 diff --git a/uip/scansbr.c b/uip/scansbr.c index be68bf8..b178e75 100644 --- a/uip/scansbr.c +++ b/uip/scansbr.c @@ -14,6 +14,7 @@ #include #include #include +#include #ifdef _FSTDIO # define _ptr _p /* Gag */ @@ -96,8 +97,7 @@ scan (FILE *inb, int innum, int outnum, char *nfs, int width, int curflg, width = MAXSCANL; } dat[3] = slwidth = width; - if ((scanl = (char *) malloc((size_t) (slwidth + 2) )) == NULL) - adios (NULL, "unable to malloc scan line (%d bytes)", slwidth+2); + scanl = (char *) mh_xmalloc((size_t) (slwidth + 2) ); if (outnum) umask(~m_gmprot()); @@ -133,8 +133,7 @@ scan (FILE *inb, int innum, int outnum, char *nfs, int width, int curflg, used_buf += ncomps+1; *--used_buf = 0; rlwidth = bodycomp && (width > SBUFSIZ) ? width : SBUFSIZ; for (i = ncomps; i--; ) - if ((*nxtbuf++ = malloc(rlwidth)) == NULL) - adios (NULL, "unable to allocate component buffer"); + *nxtbuf++ = mh_xmalloc(rlwidth); } /*