X-Git-Url: https://diplodocus.org/git/nmh/blobdiff_plain/1691e80890e5d8ba258c51c214a3e91880e1db2b..5ccbd49adba7e6d48f4094fa6eade7a7fb8ec4cf:/sbr/seq_list.c?ds=inline diff --git a/sbr/seq_list.c b/sbr/seq_list.c index afa8671c..b64e8cd8 100644 --- a/sbr/seq_list.c +++ b/sbr/seq_list.c @@ -3,10 +3,13 @@ * seq_list.c -- Get all messages in a sequence and return them * -- as a space separated list of message ranges. * - * $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 /* allocate this much buffer space at a time */ #define MAXBUFFER 1024 @@ -25,8 +28,7 @@ seq_list(struct msgs *mp, char *seqname) /* On first invocation, allocate initial buffer space */ if (!buffer) { len = MAXBUFFER; - if (!(buffer = malloc ((size_t) len))) - adios (NULL, "unable to malloc storage in seq_list"); + buffer = mh_xmalloc ((size_t) len); } /* @@ -71,8 +73,7 @@ seq_list(struct msgs *mp, char *seqname) char *newbuf; len += MAXBUFFER; - if (!(newbuf = realloc (buffer, (size_t) len))) - adios (NULL, "unable to realloc storage in seq_list"); + newbuf = mh_xrealloc (buffer, (size_t) len); bp = newbuf + (bp - buffer); buffer = newbuf; }