From: Richard Russon Date: Fri, 28 Sep 2018 19:20:10 +0000 (+0100) Subject: tidy code X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=d05b72116bcf7e71f88f088a6c8d23919186b313;p=neomutt tidy code --- diff --git a/conn/socket.c b/conn/socket.c index 674f4bb2f..77c600117 100644 --- a/conn/socket.c +++ b/conn/socket.c @@ -43,14 +43,13 @@ #include #include #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" diff --git a/imap/command.c b/imap/command.c index 80c885912..3c9a379b3 100644 --- a/imap/command.c +++ b/imap/command.c @@ -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 4dd266980..6f00125dc 100644 --- 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)) {