X-Git-Url: http://git.marmaro.de/?p=mmh;a=blobdiff_plain;f=uip%2Fdropsbr.c;h=2b3d0208740bb0fe88692ff8290d6d82c96ace65;hp=5cf4ee32c46c089976438a8610fe193bc284b225;hb=1bb1f6c3f38b05060bf699ea2743f7386889bf63;hpb=1f90e5c5a3c7cb029ce1ac3c2e760c368fd2ce92 diff --git a/uip/dropsbr.c b/uip/dropsbr.c index 5cf4ee3..2b3d020 100644 --- a/uip/dropsbr.c +++ b/uip/dropsbr.c @@ -3,20 +3,19 @@ * dropsbr.c -- create/read/manipulate mail drops * * $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 -#ifndef MMDFONLY -# include -# include -# include -# include -#else -# include "dropsbr.h" -# include "strings.h" -# include "mmdfonly.h" -#endif +#include +#include +#include +#include #ifdef HAVE_ERRNO_H # include @@ -31,8 +30,6 @@ #include -extern int errno; - /* * static prototypes */ @@ -222,14 +219,8 @@ mbx_read (FILE *fp, long pos, struct drop **drops, int noisy) if (dp >= ep) { register int curlen = dp - pp; - cp = (struct drop *) realloc ((char *) pp, + cp = (struct drop *) mh_xrealloc ((char *) pp, (size_t) (len += MAXFOLDER) * sizeof(*pp)); - if (cp == NULL) { - if (noisy) - admonish (NULL, "unable to allocate drop storage"); - free ((char *) pp); - return 0; - } dp = cp + curlen, ep = (pp = cp) + len - 1; } }