From: Richard Russon Date: Thu, 21 Mar 2019 15:47:08 +0000 (+0000) Subject: maildir: remove unnecessary function X-Git-Tag: 2019-10-25~310 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=cb1c4ac7ba64f886bc1794e285ba6a05d08025d3;p=neomutt maildir: remove unnecessary function --- diff --git a/maildir/maildir.c b/maildir/maildir.c index e6cf8ddad..d48a67bc6 100644 --- a/maildir/maildir.c +++ b/maildir/maildir.c @@ -147,22 +147,6 @@ cleanup: mutt_buffer_pool_release(&msgpath); } -/** - * maildir_read_dir - Read a Maildir style mailbox - * @param m Mailbox - * @retval 0 Success - * @retval -1 Failure - */ -static int maildir_read_dir(struct Mailbox *m) -{ - /* maildir looks sort of like MH, except that there are two subdirectories - * of the main folder path from which to read messages */ - if ((mh_read_dir(m, "new") == -1) || (mh_read_dir(m, "cur") == -1)) - return -1; - - return 0; -} - /** * ch_compare - qsort callback to sort characters * @param a First character to compare @@ -298,7 +282,12 @@ cleanup: */ static int maildir_mbox_open(struct Mailbox *m) { - return maildir_read_dir(m); + /* maildir looks sort of like MH, except that there are two subdirectories + * of the main folder path from which to read messages */ + if ((mh_read_dir(m, "new") == -1) || (mh_read_dir(m, "cur") == -1)) + return -1; + + return 0; } /**