]> granicus.if.org Git - neomutt/commitdiff
refactor pre-processor
authorRichard Russon <rich@flatcap.org>
Tue, 20 Aug 2019 19:11:54 +0000 (20:11 +0100)
committerRichard Russon <rich@flatcap.org>
Wed, 21 Aug 2019 13:12:07 +0000 (14:12 +0100)
index.c

diff --git a/index.c b/index.c
index f306b4cbfc72e0a495183a1992d22eefe8c54a41..baeaf7309e25a3bb23df8ace01340daf26566858 100644 (file)
--- a/index.c
+++ b/index.c
@@ -698,13 +698,13 @@ static int main_change_folder(struct Menu *menu, int op, struct Mailbox *m,
    * switch statement would need to be run. */
   mutt_folder_hook(buf, m ? m->name : NULL);
 
-  const int flags = (C_ReadOnly || (op == OP_MAIN_CHANGE_FOLDER_READONLY)
+  int flags = MUTT_OPEN_NO_FLAGS;
+  if (C_ReadOnly || (op == OP_MAIN_CHANGE_FOLDER_READONLY))
+    flags = MUTT_READONLY;
 #ifdef USE_NOTMUCH
-                     || (op == OP_MAIN_VFOLDER_FROM_QUERY_READONLY)
+  if (op == OP_MAIN_VFOLDER_FROM_QUERY_READONLY)
+    flags = MUTT_READONLY;
 #endif
-                         ) ?
-                        MUTT_READONLY :
-                        MUTT_OPEN_NO_FLAGS;
 
   bool free_m = false;
   if (!m)