X-Git-Url: https://diplodocus.org/git/nmh/blobdiff_plain/96a8fdb8b141aecc1732615454fdabc584c0142c..84b0fcf3611555f616abf2dcc80ec30b18f16e29:/sbr/folder_pack.c diff --git a/sbr/folder_pack.c b/sbr/folder_pack.c index 2bddb0dd..ee2a2f90 100644 --- a/sbr/folder_pack.c +++ b/sbr/folder_pack.c @@ -1,16 +1,13 @@ - -/* - * folder_pack.c -- pack (renumber) the messages in a folder +/* folder_pack.c -- pack (renumber) the messages in a folder * -- into a contiguous range from 1 to n. * - * $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 "h/mh.h" +#include "error.h" /* * Pack the message in a folder. @@ -37,12 +34,11 @@ folder_pack (struct msgs **mpp, int verbose) * for all numbers from 1 to current high message. */ if (mp->lowoff > 1) { - if ((mp = folder_realloc (mp, 1, mp->hghmsg))) - *mpp = mp; - else { - advise (NULL, "unable to allocate folder storage"); + if (!(mp = folder_realloc(mp, 1, mp->hghmsg))) { + inform("unable to allocate folder storage"); return -1; } + *mpp = mp; } for (msgnum = mp->lowmsg, hole = 1; msgnum <= mp->hghmsg; msgnum++) {