From: Ralph Corderoy Date: Sat, 9 Sep 2017 17:26:45 +0000 (+0100) Subject: mhstoresbr.c: Flip if-condition so return moves from else block. X-Git-Url: https://diplodocus.org/git/nmh/commitdiff_plain/3e90f7c100988b1f90706e2212fec687d2cd7f52?ds=sidebyside;hp=d4ca313d4340d0ef56a9e7ce564d94f3bc09e303 mhstoresbr.c: Flip if-condition so return moves from else block. Then no need for else block after return. --- diff --git a/uip/mhstoresbr.c b/uip/mhstoresbr.c index 46574a13..4052a67b 100644 --- a/uip/mhstoresbr.c +++ b/uip/mhstoresbr.c @@ -898,13 +898,12 @@ output_content_folder (char *folder, char *filename) 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; } + /* Link file into folder */ + msgnum = folder_addmsg(&mp, filename, 0, 0, 0, 0, NULL); /* free folder structure */ folder_free (mp);