From: Richard Russon Date: Fri, 18 Jan 2019 02:39:58 +0000 (+0000) Subject: tidy reopen_mailbox X-Git-Tag: 2019-10-25~372^2~8 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=0fed91dc5fc3133154c3d801201f2b83ec18d5d9;p=neomutt tidy reopen_mailbox --- diff --git a/mbox/mbox.c b/mbox/mbox.c index 1a7adef03..36c8ea1ab 100644 --- a/mbox/mbox.c +++ b/mbox/mbox.c @@ -567,7 +567,6 @@ static int reopen_mailbox(struct Mailbox *m, int *index_hint) struct Email **old_hdrs = NULL; int old_msgcount; bool msg_mod = false; - bool index_hint_set; int i, j; int rc = -1; @@ -659,8 +658,6 @@ static int reopen_mailbox(struct Mailbox *m, int *index_hint) /* now try to recover the old flags */ - index_hint_set = (index_hint == NULL); - if (!m->readonly) { for (i = 0; i < m->msg_count; i++) @@ -699,7 +696,7 @@ static int reopen_mailbox(struct Mailbox *m, int *index_hint) if (found) { /* this is best done here */ - if (!index_hint_set && *index_hint == j) + if (index_hint && *index_hint == j) *index_hint = i; if (old_hdrs[j]->changed)