]> granicus.if.org Git - neomutt/commitdiff
tidy code
authorRichard Russon <rich@flatcap.org>
Fri, 28 Sep 2018 19:20:10 +0000 (20:20 +0100)
committerRichard Russon <rich@flatcap.org>
Fri, 28 Sep 2018 22:52:47 +0000 (23:52 +0100)
conn/socket.c
imap/command.c
mx.c

index 674f4bb2fb35e50619798ba0cacf8b862388ada8..77c6001179d26eea4acfd5ebdde299509d533abe 100644 (file)
 #include <time.h>
 #include <unistd.h>
 #include "mutt/mutt.h"
+#include "socket.h"
 #include "conn_globals.h"
 #include "connaccount.h"
 #include "connection.h"
 #include "globals.h"
 #include "options.h"
 #include "protos.h"
-
-#include "socket.h"
 #include "ssl.h"
 #include "tunnel.h"
 
index 80c8859123943c9565bf4202a1788a7e027b3e52..3c9a379b357f0d6efbb0a8c7c27ca5a14cf05d6f 100644 (file)
@@ -1348,7 +1348,7 @@ void imap_cmd_finish(struct ImapMboxData *mdata)
     }
   }
 
-  mdata->status = false;
+  mdata->status = 0;
 }
 
 /**
diff --git a/mx.c b/mx.c
index 4dd266980a36ec0b0c46a3f9c8c2348928e00084..6f00125dc15301af3e3d80c317cfbc12a04a1614 100644 (file)
--- a/mx.c
+++ b/mx.c
@@ -243,8 +243,6 @@ struct Context *mx_mbox_open(const char *path, int flags)
   if (!path || !path[0])
     return NULL;
 
-  int rc;
-
   struct Context *ctx = mutt_mem_calloc(1, sizeof(*ctx));
 
   ctx->mailbox = mutt_find_mailbox(path);
@@ -261,8 +259,8 @@ struct Context *mx_mbox_open(const char *path, int flags)
   ctx->msgnotreadyet = -1;
   ctx->collapsed = false;
 
-  for (rc = 0; rc < RIGHTSMAX; rc++)
-    mutt_bit_set(ctx->mailbox->rights, rc);
+  for (int i = 0; i < RIGHTSMAX; i++)
+    mutt_bit_set(ctx->mailbox->rights, i);
 
   if (flags & MUTT_QUIET)
     ctx->mailbox->quiet = true;
@@ -310,7 +308,7 @@ struct Context *mx_mbox_open(const char *path, int flags)
   if (!ctx->mailbox->quiet)
     mutt_message(_("Reading %s..."), ctx->mailbox->path);
 
-  rc = ctx->mailbox->mx_ops->mbox_open(ctx);
+  int rc = ctx->mailbox->mx_ops->mbox_open(ctx);
 
   if ((rc == 0) || (rc == -2))
   {