X-Git-Url: https://diplodocus.org/git/nmh/blobdiff_plain/dee387b53ab0d42922f857b60d6f980c9e79d16f..1524cb8c0b86a854149d7859d6a2503d61dbaa36:/uip/dropsbr.c diff --git a/uip/dropsbr.c b/uip/dropsbr.c index 45d5c286..2b3d0208 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; } }