Then no need for else block after return.
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);