X-Git-Url: https://diplodocus.org/git/nmh/blobdiff_plain/8a14191c0a0ad15bb8f35b49748c75c1e0a8c2f4..94187a80bd60baab4b9c4b949ad820d730578123:/sbr/folder_pack.c?ds=inline diff --git a/sbr/folder_pack.c b/sbr/folder_pack.c index b2f79532..22c02079 100644 --- a/sbr/folder_pack.c +++ b/sbr/folder_pack.c @@ -1,6 +1,4 @@ - -/* - * 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. * * This code is Copyright (c) 2002, by the authors of nmh. See the @@ -35,12 +33,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 { + 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++) {