X-Git-Url: http://git.marmaro.de/?p=mmh;a=blobdiff_plain;f=uip%2Frcvdist.c;h=c4be1b2b70208171aab617c91fb94fc512f6a7fb;hp=922670b52448c74d97d181cf3c240dc8e97e6ae4;hb=389877bae1fe1a9f7259b8979f6a930744d90fab;hpb=794dab6aa5027ffaf024506140c258f6a0a9322d diff --git a/uip/rcvdist.c b/uip/rcvdist.c index 922670b..c4be1b2 100644 --- a/uip/rcvdist.c +++ b/uip/rcvdist.c @@ -3,12 +3,18 @@ * rcvdist.c -- asynchronously redistribute messages * * $Id$ + * + * This code is Copyright (c) 2002, by the authors of nmh. See the + * COPYRIGHT file in the root directory of the nmh distribution for + * complete copyright information. */ #include #include #include -#include +#include +#include +#include static struct swit switches[] = { #define FORMSW 0 @@ -16,7 +22,7 @@ static struct swit switches[] = { #define VERSIONSW 1 { "version", 0 }, #define HELPSW 2 - { "help", 4 }, + { "help", 0 }, { NULL, 0 } }; @@ -176,8 +182,7 @@ rcvdistout (FILE *inb, char *form, char *addrs) *--savecomp = 0; for (i = ncomps; i--;) - if (!(*nxtbuf++ = malloc (SBUFSIZ))) - adios (NULL, "unable to allocate component buffer"); + *nxtbuf++ = mh_xmalloc (SBUFSIZ); nxtbuf = compbuffers; tmpbuf = *nxtbuf++; @@ -243,7 +248,7 @@ rcvdistout (FILE *inb, char *form, char *addrs) finished: ; i = format_len + char_read + 256; - scanl = malloc ((size_t) i + 2); + scanl = mh_xmalloc ((size_t) i + 2); dat[0] = dat[1] = dat[2] = dat[4] = 0; dat[3] = outputlinelen; fmt_scan (fmt, scanl, i, dat);