]> diplodocus.org Git - nmh/blobdiff - sbr/folder_pack.c
Support building without Cyrus SASL or TLS.
[nmh] / sbr / folder_pack.c
index b2f7953274960d9b44840926ad46ab54f14db108..ba84d1f7f01435dd246612a19a05ff85c6b19bb5 100644 (file)
@@ -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
@@ -8,7 +6,13 @@
  * complete copyright information.
  */
 
-#include <h/mh.h>
+#include "h/mh.h"
+#include "m_name.h"
+#include "seq_setcur.h"
+#include "ext_hook.h"
+#include "folder_realloc.h"
+#include "folder_pack.h"
+#include "error.h"
 
 /*
  * Pack the message in a folder.
@@ -35,12 +39,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++) {