]> diplodocus.org Git - nmh/commitdiff
folder_pack.c: Flip if-condition so return moves from else block.
authorRalph Corderoy <ralph@inputplus.co.uk>
Sat, 9 Sep 2017 17:28:31 +0000 (18:28 +0100)
committerRalph Corderoy <ralph@inputplus.co.uk>
Sat, 9 Sep 2017 17:28:31 +0000 (18:28 +0100)
Then no need for else block after return.

sbr/folder_pack.c

index 82a366c..22c0207 100644 (file)
@@ -33,12 +33,11 @@ folder_pack (struct msgs **mpp, int verbose)
      * for all numbers from 1 to current high message.
      */
     if (mp->lowoff > 1) {
      * 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;
        }
            inform("unable to allocate folder storage");
            return -1;
        }
+        *mpp = mp;
     }
 
     for (msgnum = mp->lowmsg, hole = 1; msgnum <= mp->hghmsg; msgnum++) {
     }
 
     for (msgnum = mp->lowmsg, hole = 1; msgnum <= mp->hghmsg; msgnum++) {