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

uip/mhstoresbr.c

index 46574a13a029021b8112f5eb85d36ea44e8a60ae..4052a67bcf2a52c2d0c99ed7795df5be52a26175 100644 (file)
@@ -898,13 +898,12 @@ output_content_folder (char *folder, char *filename)
     struct msgs *mp;
 
     /* Read the folder. */
     struct msgs *mp;
 
     /* Read the folder. */
-    if ((mp = folder_read (folder, 0))) {
-       /* Link file into folder */
-       msgnum = folder_addmsg (&mp, filename, 0, 0, 0, 0, NULL);
-    } else {
+    if (!(mp = folder_read(folder, 0))) {
        inform("unable to read folder %s", folder);
        return NOTOK;
     }
        inform("unable to read folder %s", folder);
        return NOTOK;
     }
+    /* Link file into folder */
+    msgnum = folder_addmsg(&mp, filename, 0, 0, 0, 0, NULL);
 
     /* free folder structure */
     folder_free (mp);
 
     /* free folder structure */
     folder_free (mp);