]> granicus.if.org Git - neomutt/commitdiff
Reduce variable scope - mx.c
authorFederico Kircheis <federico.kircheis@gmail.com>
Mon, 5 Mar 2018 17:58:53 +0000 (18:58 +0100)
committerRichard Russon <rich@flatcap.org>
Tue, 6 Mar 2018 02:50:21 +0000 (02:50 +0000)
mx.c

diff --git a/mx.c b/mx.c
index c81d1a9c89863d68586d57f6ce7918825e3d793f..17a20c925660d7116f9fa72ae3fb0e347c1a4177 100644 (file)
--- a/mx.c
+++ b/mx.c
@@ -643,7 +643,6 @@ int mx_close_mailbox(struct Context *ctx, int *index_hint)
 {
   int i, move_messages = 0, purge = 1, read_msgs = 0;
   int check;
-  int is_spool = 0;
   struct Context f;
   char mbox[_POSIX_PATH_MAX];
   char buf[SHORT_STRING];
@@ -694,9 +693,8 @@ int mx_close_mailbox(struct Context *ctx, int *index_hint)
 
   if (read_msgs && Move != MUTT_NO)
   {
-    char *p = NULL;
-
-    p = mutt_find_hook(MUTT_MBOXHOOK, ctx->path);
+    int is_spool;
+    char *p = mutt_find_hook(MUTT_MBOXHOOK, ctx->path);
     if (p)
     {
       is_spool = 1;