]> granicus.if.org Git - neomutt/commitdiff
kill assign-assign
authorRichard Russon <rich@flatcap.org>
Sun, 19 Aug 2018 02:30:02 +0000 (03:30 +0100)
committerRichard Russon <rich@flatcap.org>
Sun, 19 Aug 2018 12:44:23 +0000 (13:44 +0100)
41 files changed:
alias.c
color.c
compose.c
config/mbtable.c
copy.c
curs_lib.c
edit.c
editmsg.c
email/address.c
email/parse.c
email/rfc2047.c
email/thread.c
enter.c
hcache/bdb.c
imap/imap.c
imap/message.c
init.c
main.c
mbox/mbox.c
mutt/charset.c
mutt/history.c
mutt/md5.c
mutt/sha1.c
mutt_lua.c
mutt_thread.c
muttlib.c
ncrypt/crypt.c
ncrypt/crypt_gpgme.c
ncrypt/gnupgparse.c
nntp/nntp.c
notmuch/mutt_notmuch.c
pager.c
pattern.c
pop/pop.c
query.c
recvattach.c
remailer.c
send.c
sendlib.c
sidebar.c
smtp.c

diff --git a/alias.c b/alias.c
index 3438d6a52bf0fda43a11c95e073e9be9e0f23127..4068af96e44c6e1e5ba86b7c443a53fc6903b279 100644 (file)
--- a/alias.c
+++ b/alias.c
@@ -85,7 +85,10 @@ static struct Address *expand_aliases_r(struct Address *a, struct ListHead *expn
           if (head)
             last->next = w;
           else
-            head = last = w;
+          {
+            head = w;
+            last = w;
+          }
           while (last && last->next)
             last = last->next;
         }
@@ -115,7 +118,10 @@ static struct Address *expand_aliases_r(struct Address *a, struct ListHead *expn
       last = last->next;
     }
     else
-      head = last = a;
+    {
+      head = a;
+      last = a;
+    }
     a = a->next;
     last->next = NULL;
   }
diff --git a/color.c b/color.c
index aba956ec038a7257cecc37f25a906cf9a4af4ca0..0ee9145705a399bb13ca25a64005f7b18d02bb43 100644 (file)
--- a/color.c
+++ b/color.c
@@ -154,8 +154,8 @@ static struct ColorLine *new_color_line(void)
 {
   struct ColorLine *p = mutt_mem_calloc(1, sizeof(struct ColorLine));
 
-  p->fg = p->bg = -1;
-
+  p->fg = -1;
+  p->bg = -1;
   return p;
 }
 
@@ -367,11 +367,12 @@ static int mutt_lookup_color(short pair, short *fg, short *bg)
  */
 int mutt_combine_color(int fg_attr, int bg_attr)
 {
-  short fg, bg;
+  short fg = COLOR_DEFAULT;
+  short bg = COLOR_DEFAULT;
 
-  fg = bg = COLOR_DEFAULT;
   mutt_lookup_color(fg_attr, &fg, NULL);
   mutt_lookup_color(bg_attr, NULL, &bg);
+
   if ((fg == COLOR_DEFAULT) && (bg == COLOR_DEFAULT))
     return A_NORMAL;
   return mutt_alloc_color(fg, bg);
index 8b7082378c624ebcc77fe363ef5f48af7b0cec5f..42b4cc4aaf1e121ec6da8b26884dbcb3d5515165 100644 (file)
--- a/compose.c
+++ b/compose.c
@@ -1202,7 +1202,8 @@ int mutt_compose_menu(struct Header *msg, char *fcc, size_t fcclen,
              * and remove from the msg->content list */
             if (!alts)
             {
-              group->parts = alts = bptr;
+              group->parts = bptr;
+              alts = bptr;
               bptr = bptr->next;
               alts->next = NULL;
             }
@@ -1300,7 +1301,8 @@ int mutt_compose_menu(struct Header *msg, char *fcc, size_t fcclen,
              * and remove from the msg->content list */
             if (!alts)
             {
-              group->parts = alts = bptr;
+              group->parts = bptr;
+              alts = bptr;
               bptr = bptr->next;
               alts->next = NULL;
             }
index 7641bb431b0e328777b29d275748da419d6677a8..c1cafdf8b38c78c84872c261359f24bda7cb942b 100644 (file)
@@ -61,7 +61,8 @@ struct MbTable *mbtable_parse(const char *s)
   /* This could be more space efficient.  However, being used on tiny
    * strings (Tochars and StatusChars), the overhead is not great. */
   t->chars = mutt_mem_calloc(slen, sizeof(char *));
-  d = t->segmented_str = mutt_mem_calloc(slen * 2, sizeof(char));
+  t->segmented_str = mutt_mem_calloc(slen * 2, sizeof(char));
+  d = t->segmented_str;
 
   memset(&mbstate, 0, sizeof(mbstate));
   while (slen && (k = mbrtowc(NULL, s, slen, &mbstate)))
diff --git a/copy.c b/copy.c
index a1d086b20fe1bcdfa12f36d73591c2bf1a8974b4..8b5c1891b65b491f3505938b69bd5d40c5bf4e97 100644 (file)
--- a/copy.c
+++ b/copy.c
@@ -221,7 +221,8 @@ int mutt_copy_hdr(FILE *in, FILE *out, LOFF_T off_start, LOFF_T off_end,
       {
         if ((flags & CH_FROM) == 0)
           continue;
-        this_is_from = from = true;
+        this_is_from = true;
+        from = true;
       }
       else if (buf[0] == '\n' || (buf[0] == '\r' && buf[1] == '\n'))
         break; /* end of header */
@@ -949,7 +950,9 @@ static void format_address_header(char **h, struct Address *a)
   {
     struct Address *tmp = a->next;
     a->next = NULL;
-    *buf = *cbuf = *c2buf = '\0';
+    *buf = '\0';
+    *cbuf = '\0';
+    *c2buf = '\0';
     const size_t l = mutt_addr_write(buf, sizeof(buf), a, false);
     a->next = tmp;
 
index 7d54af5d7d60b44b965e49816d314dfc2b10b63e..131afe25a567809c0f0ba7e5137ae991487338c4 100644 (file)
@@ -289,16 +289,14 @@ int mutt_yesorno(const char *msg, int def)
   char *expr = NULL;
   regex_t reyes;
   regex_t reno;
-  int reyes_ok;
-  int reno_ok;
   char answer[2];
 
   answer[1] = '\0';
 
-  reyes_ok = (expr = nl_langinfo(YESEXPR)) && (expr[0] == '^') &&
-             (REGCOMP(&reyes, expr, REG_NOSUB) == 0);
-  reno_ok = (expr = nl_langinfo(NOEXPR)) && (expr[0] == '^') &&
-            (REGCOMP(&reno, expr, REG_NOSUB) == 0);
+  bool reyes_ok = (expr = nl_langinfo(YESEXPR)) && (expr[0] == '^') &&
+                  (REGCOMP(&reyes, expr, REG_NOSUB) == 0);
+  bool reno_ok = (expr = nl_langinfo(NOEXPR)) && (expr[0] == '^') &&
+                 (REGCOMP(&reno, expr, REG_NOSUB) == 0);
 
   /* In order to prevent the default answer to the question to wrapped
    * around the screen in the even the question is wider than the screen,
diff --git a/edit.c b/edit.c
index d1f775760eba30f5923f4a77131e6a87d893d61f..bb06bd21b38bbf68721e1b3e24866f2feb66847c 100644 (file)
--- a/edit.c
+++ b/edit.c
@@ -511,7 +511,8 @@ int mutt_builtin_editor(const char *path, struct Header *msg, struct Header *cur
             char *tag = NULL, *err = NULL;
             be_free_memory(buf, buflen);
             buf = NULL;
-            bufmax = buflen = 0;
+            bufmax = 0;
+            buflen = 0;
 
             if (EditHeaders)
             {
index bbd404cc5344aa91587175b961dd626421508243..3553e67c1c9af9facf224c75bb277f99b36f916f 100644 (file)
--- a/editmsg.c
+++ b/editmsg.c
@@ -209,7 +209,8 @@ static int edit_or_view_one_message(bool edit, struct Context *ctx, struct Heade
 
   o_read = cur->read;
   o_old = cur->old;
-  cur->read = cur->old = false;
+  cur->read = false;
+  cur->old = false;
   msg = mx_msg_open_new(&tmpctx, cur, of);
   cur->read = o_read;
   cur->old = o_old;
index 55b6ba0dcdd298f270833a78f9cf46afa00d71c3..0362008805540971de62992c5f014952f71da496 100644 (file)
@@ -743,7 +743,10 @@ struct Address *mutt_addr_copy_list(struct Address *addr, bool prune)
       last = last->next;
     }
     else
-      top = last = mutt_addr_copy(addr);
+    {
+      last = mutt_addr_copy(addr);
+      top = last;
+    }
   }
   return top;
 }
@@ -768,7 +771,10 @@ struct Address *mutt_addr_append(struct Address **a, struct Address *b, bool pru
   if (tmp)
     tmp->next = mutt_addr_copy_list(b, prune);
   else
-    tmp = *a = mutt_addr_copy_list(b, prune);
+  {
+    *a = mutt_addr_copy_list(b, prune);
+    tmp = *a;
+  }
   while (tmp && tmp->next)
     tmp = tmp->next;
   return tmp;
index 74392abd2d73488565ccbd81fcaa6ac6fb871945..e47228f578164e652b1393eb3f0992d91742c456 100644 (file)
@@ -309,7 +309,8 @@ char *mutt_extract_message_id(const char *s, const char **saveptr)
     if (*p == '<')
     {
       s = p;
-      o = onull = NULL;
+      o = NULL;
+      onull = NULL;
       continue;
     }
 
@@ -339,7 +340,9 @@ char *mutt_extract_message_id(const char *s, const char **saveptr)
     else if (o)
     {
       /* more than two lines, give up */
-      s = o = onull = NULL;
+      s = NULL;
+      o = NULL;
+      onull = NULL;
     }
     else
     {
@@ -1342,7 +1345,10 @@ struct Body *mutt_parse_multipart(FILE *fp, const char *boundary, LOFF_T end_off
           last = new;
         }
         else
-          last = head = new;
+        {
+          last = new;
+          head = new;
+        }
       }
     }
   }
index 7b4a1c7b94a2f05e93e6caf5ad9ca8cf5b27a83a..f3e7966a9e5c8f8bfc6a840eac82c02da9405091 100644 (file)
@@ -447,7 +447,10 @@ static int encode(const char *d, size_t dlen, int col, const char *fromcode,
   ulen = mutt_str_strlen(u);
 
   /* Find earliest and latest things we must encode. */
-  s0 = s1 = t0 = t1 = 0;
+  s0 = 0;
+  s1 = 0;
+  t0 = 0;
+  t1 = 0;
   for (t = u; t < (u + ulen); t++)
   {
     if ((*t & 0x80) || ((*t == '=') && (t[1] == '?') && ((t == u) || HSPACE(*(t - 1)))))
index d7709de279d2a439a47d1046afb4ad80bdf8020b..cf72844aca71132cf033857ee7684c4b5b29435e 100644 (file)
@@ -204,7 +204,8 @@ void clean_references(struct MuttThread *brk, struct MuttThread *cur)
         FREE(&np);
       }
 
-      h->env->refs_changed = h->changed = true;
+      h->env->refs_changed = true;
+      h->changed = true;
     }
   }
 }
diff --git a/enter.c b/enter.c
index f7e36d70088590710d0ddb5732f7791930f90d21..47974ba015e5bfa3a48fd704df711b14889a5bc6 100644 (file)
--- a/enter.c
+++ b/enter.c
@@ -327,7 +327,8 @@ int mutt_enter_string_full(char *buf, size_t buflen, int col, int flags, bool mu
           break;
 
         case OP_EDITOR_KILL_LINE:
-          state->curpos = state->lastchar = 0;
+          state->curpos = 0;
+          state->lastchar = 0;
           break;
 
         case OP_EDITOR_KILL_EOL:
@@ -743,7 +744,10 @@ int mutt_enter_string_full(char *buf, size_t buflen, int col, int flags, bool mu
       {
         first = 0;
         if (IsWPrint(wc)) /* why? */
-          state->curpos = state->lastchar = 0;
+        {
+          state->curpos = 0;
+          state->lastchar = 0;
+        }
       }
 
       if (wc == '\r' || wc == '\n')
index 105cf129b8d5aaea8898cd74b2fdec0e2c8150d3..f061ccd10cae55c2528bebf2f532785728fab97f 100644 (file)
@@ -62,8 +62,10 @@ struct HcacheDbCtx
 static void dbt_init(DBT *dbt, void *data, size_t len)
 {
   dbt->data = data;
-  dbt->size = dbt->ulen = len;
-  dbt->dlen = dbt->doff = 0;
+  dbt->size = len;
+  dbt->ulen = len;
+  dbt->dlen = 0;
+  dbt->doff = 0;
   dbt->flags = DB_DBT_USERMEM;
 }
 
@@ -74,7 +76,10 @@ static void dbt_init(DBT *dbt, void *data, size_t len)
 static void dbt_empty_init(DBT *dbt)
 {
   dbt->data = NULL;
-  dbt->size = dbt->ulen = dbt->dlen = dbt->doff = 0;
+  dbt->size = 0;
+  dbt->ulen = 0;
+  dbt->dlen = 0;
+  dbt->doff = 0;
   dbt->flags = 0;
 }
 
index 323d966805c5671581af5d1c714ac059e32c4889..1c2902e38ae6660b038c88a96f1da6b37d93cc87 100644 (file)
@@ -1103,7 +1103,10 @@ void imap_close_connection(struct ImapData *idata)
     mutt_socket_close(idata->conn);
     idata->state = IMAP_DISCONNECTED;
   }
-  idata->seqno = idata->nextcmd = idata->lastcmd = idata->status = false;
+  idata->seqno = false;
+  idata->nextcmd = false;
+  idata->lastcmd = false;
+  idata->status = false;
   memset(idata->cmds, 0, sizeof(struct ImapCommand) * idata->cmdslots);
 }
 
index fa48ce9b45806c3aadcc3b815fb20ab1d359548a..c1414b1df39859857f4249596761798c40d1de52 100644 (file)
@@ -218,7 +218,11 @@ static char *msg_parse_flags(struct ImapHeader *h, char *s)
   FREE(&hd->flags_system);
   FREE(&hd->flags_remote);
 
-  hd->deleted = hd->flagged = hd->replied = hd->read = hd->old = false;
+  hd->deleted = false;
+  hd->flagged = false;
+  hd->replied = false;
+  hd->read = false;
+  hd->old = false;
 
   /* start parsing */
   while (*s && *s != ')')
@@ -1281,7 +1285,9 @@ int imap_append_message(struct Context *ctx, struct Message *msg)
   imap_munge_mbox_name(idata, mbox, sizeof(mbox), mailbox);
   mutt_date_make_imap(internaldate, sizeof(internaldate), msg->received);
 
-  imap_flags[0] = imap_flags[1] = 0;
+  imap_flags[0] = 0;
+  imap_flags[1] = 0;
+
   if (msg->flags.read)
     mutt_str_strcat(imap_flags, sizeof(imap_flags), " \\Seen");
   if (msg->flags.replied)
diff --git a/init.c b/init.c
index 4cd780daced7a2eb439fde21ec28ec8c55ad850d..0d9e0cc0c1495a7356d106b604b857cf727de525 100644 (file)
--- a/init.c
+++ b/init.c
@@ -2931,7 +2931,8 @@ int mutt_init(bool skip_sys_rc, struct ListHead *commands)
     snprintf(buffer, sizeof(buffer), "Reply-To: %s", p);
 
     mutt_buffer_init(&buf);
-    buf.data = buf.dptr = buffer;
+    buf.data = buffer;
+    buf.dptr = buffer;
     buf.dsize = mutt_str_strlen(buffer);
 
     mutt_buffer_init(&token);
@@ -3172,7 +3173,8 @@ int mutt_parse_rc_line(/* const */ char *line, struct Buffer *token, struct Buff
     return 0;
 
   mutt_buffer_init(&expn);
-  expn.data = expn.dptr = line;
+  expn.data = line;
+  expn.dptr = line;
   expn.dsize = mutt_str_strlen(line);
 
   *err->data = 0;
diff --git a/main.c b/main.c
index e7214027340842371cf599e9b08f9a6f6d616283..f898e69b8a1612c90eb06ef672b7aa4b00a48c0e 100644 (file)
--- a/main.c
+++ b/main.c
@@ -1041,7 +1041,10 @@ int main(int argc, char *argv[], char *envp[])
           a = a->next;
         }
         else
-          msg->content = a = mutt_make_file_attach(np->data);
+        {
+          a = mutt_make_file_attach(np->data);
+          msg->content = a;
+        }
         if (!a)
         {
           mutt_error(_("%s: unable to attach file"), np->data);
index ba0a070b1c37f26d287ba73105a6d1d7e81eca8c..55850b6f9cc1736297f19541790ddfe1df7ab171 100644 (file)
@@ -162,7 +162,8 @@ static int mmdf_parse_mailbox(struct Context *ctx)
 
       if (ctx->msgcount == ctx->hdrmax)
         mx_alloc_memory(ctx);
-      ctx->hdrs[ctx->msgcount] = hdr = mutt_header_new();
+      hdr = mutt_header_new();
+      ctx->hdrs[ctx->msgcount] = hdr;
       hdr->offset = loc;
       hdr->index = ctx->msgcount;
 
@@ -333,7 +334,8 @@ static int mbox_parse_mailbox(struct Context *ctx)
       if (ctx->msgcount == ctx->hdrmax)
         mx_alloc_memory(ctx);
 
-      curhdr = ctx->hdrs[ctx->msgcount] = mutt_header_new();
+      ctx->hdrs[ctx->msgcount] = mutt_header_new();
+      curhdr = ctx->hdrs[ctx->msgcount];
       curhdr->received = t - mutt_date_local_tz(t);
       curhdr->offset = loc;
       curhdr->index = ctx->msgcount;
index edafdff7dfde40af12965611b2a77f8a43219c41..3a240300ae2c1b798d603f49769696d48ec46a9a 100644 (file)
@@ -746,7 +746,8 @@ int mutt_ch_convert_string(char **ps, const char *from, const char *to, int flag
   ib = s;
   ibl = len + 1;
   obl = MB_LEN_MAX * ibl;
-  ob = buf = mutt_mem_malloc(obl + 1);
+  buf = mutt_mem_malloc(obl + 1);
+  ob = buf;
 
   mutt_ch_iconv(cd, &ib, &ibl, &ob, &obl, inrepls, outrepl, &rc);
   iconv_close(cd);
@@ -823,7 +824,8 @@ struct FgetConv *mutt_ch_fgetconv_open(FILE *file, const char *from, const char
     static const char *repls[] = { "\357\277\275", "?", 0 };
 
     fc = mutt_mem_malloc(sizeof(struct FgetConv));
-    fc->p = fc->ob = fc->bufo;
+    fc->p = fc->bufo;
+    fc->ob = fc->bufo;
     fc->ib = fc->bufi;
     fc->ibl = 0;
     fc->inrepls = mutt_ch_is_utf8(to) ? repls : repls + 1;
@@ -868,7 +870,8 @@ int mutt_ch_fgetconv(struct FgetConv *fc)
     return (unsigned char) *(fc->p)++;
 
   /* Try to convert some more */
-  fc->p = fc->ob = fc->bufo;
+  fc->p = fc->bufo;
+  fc->ob = fc->bufo;
   if (fc->ibl)
   {
     size_t obl = sizeof(fc->bufo);
index c5b4aa0d2568503d371cc7946cc47e9ff14002c1..404e711e06347247f93326ca6e9beaa8983ed2cc 100644 (file)
@@ -368,7 +368,8 @@ static void remove_history_dups(enum HistoryClass hclass, const char *str)
     return; /* disabled */
 
   /* Remove dups from 0..last-1 compacting up. */
-  source = dest = 0;
+  source = 0;
+  dest = 0;
   while (source < h->last)
   {
     if (mutt_str_strcmp(h->hist[source], str) == 0)
@@ -387,7 +388,8 @@ static void remove_history_dups(enum HistoryClass hclass, const char *str)
     h->hist[source--] = NULL;
 
   /* Remove dups from last+1 .. History compacting down. */
-  source = dest = History;
+  source = History;
+  dest = History;
   while (source > old_last)
   {
     if (mutt_str_strcmp(h->hist[source], str) == 0)
index 313e018999a7ae2d1cdf436caf2bb601218f252c..d05ac8883c38638371b7efc71172e881ed762e64 100644 (file)
@@ -263,7 +263,8 @@ void mutt_md5_init_ctx(struct Md5Ctx *ctx)
   ctx->C = 0x98badcfe;
   ctx->D = 0x10325476;
 
-  ctx->total[0] = ctx->total[1] = 0;
+  ctx->total[0] = 0;
+  ctx->total[1] = 0;
   ctx->buflen = 0;
 }
 
index 29358d23a5e6397bf90fb507af135c1b7aef265c..284d4671c0c0720739041961b6d715881dd07a90 100644 (file)
@@ -168,7 +168,11 @@ void mutt_sha1_transform(uint32_t state[5], const unsigned char buffer[64])
   state[3] += d;
   state[4] += e;
   /* Wipe variables */
-  a = b = c = d = e = 0;
+  a = 0;
+  b = 0;
+  c = 0;
+  d = 0;
+  e = 0;
   memset(block, '\0', sizeof(block));
 }
 
@@ -184,7 +188,8 @@ void mutt_sha1_init(struct Sha1Ctx *context)
   context->state[2] = 0x98BADCFE;
   context->state[3] = 0x10325476;
   context->state[4] = 0xC3D2E1F0;
-  context->count[0] = context->count[1] = 0;
+  context->count[0] = 0;
+  context->count[1] = 0;
 }
 
 /**
index f4a86b126df9732172d688e022b734f602dbec46..7b4a0b7467232fdd2caa4f881aab7f2d58e32223 100644 (file)
@@ -107,7 +107,8 @@ static int lua_mutt_call(lua_State *l)
     mutt_str_strncat(buffer, sizeof(buffer), " ", 1);
   }
 
-  expn.data = expn.dptr = buffer;
+  expn.data = buffer;
+  expn.dptr = buffer;
   expn.dsize = mutt_str_strlen(buffer);
 
   if (command->func(&token, &expn, command->data, &err))
index 16551e94850b1eae98eb4ae04e26ea4c87d7ba01..a3dc521886829e5cfa78aa752556ce56ac55bae5 100644 (file)
@@ -638,7 +638,8 @@ struct MuttThread *mutt_sort_subthreads(struct MuttThread *thread, bool init)
 
   top = thread;
 
-  array = mutt_mem_calloc((array_size = 256), sizeof(struct MuttThread *));
+  array_size = 256;
+  array = mutt_mem_calloc(array_size, sizeof(struct MuttThread *));
   while (true)
   {
     if (init || !thread->sort_key)
@@ -822,7 +823,10 @@ void mutt_sort_threads(struct Context *ctx, bool init)
   /* we want a quick way to see if things are actually attached to the top of the
    * thread tree or if they're just dangling, so we attach everything to a top
    * node temporarily */
-  top.parent = top.next = top.prev = NULL;
+  top.parent = NULL;
+  top.next = NULL;
+  top.prev = NULL;
+
   top.child = ctx->tree;
   for (thread = ctx->tree; thread; thread = thread->next)
     thread->parent = &top;
@@ -1415,7 +1419,8 @@ static bool link_threads(struct Header *parent, struct Header *child, struct Con
   mutt_list_insert_head(&child->env->in_reply_to, mutt_str_strdup(parent->env->message_id));
   mutt_set_flag(ctx, child, MUTT_TAG, 0);
 
-  child->env->irt_changed = child->changed = true;
+  child->env->irt_changed = true;
+  child->changed = true;
   return true;
 }
 
index e6be323ec924b06dd0bbe41f4e0069af746be57b..22a10717df44ed5825b9d555650ee3a163c83c99 100644 (file)
--- a/muttlib.c
+++ b/muttlib.c
@@ -218,9 +218,11 @@ char *mutt_expand_path_regex(char *buf, size_t buflen, bool regex)
         {
           struct Header *h = mutt_header_new();
           h->env = mutt_env_new();
-          h->env->from = h->env->to = alias;
+          h->env->from = alias;
+          h->env->to = alias;
           mutt_default_save(p, sizeof(p), h);
-          h->env->from = h->env->to = NULL;
+          h->env->from = NULL;
+          h->env->to = NULL;
           mutt_header_free(&h);
           /* Avoid infinite recursion if the resulting folder starts with '@' */
           if (*p != '@')
@@ -1078,7 +1080,10 @@ void mutt_expando_format(char *buf, size_t buflen, size_t col, int cols, const c
         int pl, pw;
         pl = mutt_mb_charlen(src, &pw);
         if (pl <= 0)
-          pl = pw = 1;
+        {
+          pl = 1;
+          pw = 1;
+        }
 
         /* see if there's room to add content, else ignore */
         if ((col < cols && wlen < buflen) || soft)
@@ -1149,7 +1154,10 @@ void mutt_expando_format(char *buf, size_t buflen, size_t col, int cols, const c
         int pl, pw;
         pl = mutt_mb_charlen(src, &pw);
         if (pl <= 0)
-          pl = pw = 1;
+        {
+          pl = 1;
+          pw = 1;
+        }
 
         /* see if there's room to add content, else ignore */
         if (col < cols && wlen < buflen)
index 92367c8b20b2ae1f9ab9b175c98bca219ca0d909..73014ec141e348e54efea70891fdeb9861ea3b54 100644 (file)
@@ -270,7 +270,8 @@ int mutt_protect(struct Header *msg, char *keylist)
       tmp_pbody = crypt_smime_sign_message(msg->content);
       if (!tmp_pbody)
         return -1;
-      pbody = tmp_smime_pbody = tmp_pbody;
+      pbody = tmp_pbody;
+      tmp_smime_pbody = tmp_pbody;
     }
 
     if (((WithCrypto & APPLICATION_PGP) != 0) && (msg->security & APPLICATION_PGP) &&
@@ -281,7 +282,8 @@ int mutt_protect(struct Header *msg, char *keylist)
         return -1;
 
       flags &= ~SIGN;
-      pbody = tmp_pgp_pbody = tmp_pbody;
+      pbody = tmp_pbody;
+      tmp_pgp_pbody = tmp_pbody;
     }
 
     if ((WithCrypto != 0) && (msg->security & APPLICATION_SMIME) &&
@@ -1256,19 +1258,22 @@ const char *crypt_get_fingerprint_or_id(char *p, const char **pphint,
   if (pfcopy)
   {
     /* Use pfcopy to strip all spaces from fingerprint and as hint. */
-    s1 = s2 = pfcopy;
+    s1 = pfcopy;
+    s2 = pfcopy;
     do
     {
       *(s1++) = *(s2 = mutt_str_skip_whitespace(s2));
     } while (*(s2++));
 
     phint = pfcopy;
-    ps = pl = NULL;
+    ps = NULL;
+    pl = NULL;
   }
   else
   {
     phint = p;
-    ps = pl = NULL;
+    ps = NULL;
+    pl = NULL;
     if (isid == 1)
     {
       if (mutt_str_strlen(pf) == 16)
index 0e597be84161c5d1a03ef28b85495bb9e6272f22..a4246b29fde893acc75edff33be921a243dca10a 100644 (file)
@@ -4054,7 +4054,8 @@ static char *list_to_pattern(struct ListHead *list)
     n++; /* delimiter or end of string */
   }
   n++; /* make sure to allocate at least one byte */
-  pattern = p = mutt_mem_calloc(1, n);
+  p = mutt_mem_calloc(1, n);
+  pattern = p;
   STAILQ_FOREACH(np, list, entries)
   {
     s = np->data;
@@ -4292,7 +4293,8 @@ static struct CryptKeyInfo *crypt_select_key(struct CryptKeyInfo *keys,
   *forced_valid = 0;
 
   /* build the key table */
-  keymax = i = 0;
+  keymax = 0;
+  i = 0;
   struct CryptKeyInfo **key_table = NULL;
   for (k = keys; k; k = k->next)
   {
@@ -4565,7 +4567,8 @@ static struct CryptKeyInfo *crypt_getkeybyaddr(struct Address *a,
     {
       struct CryptKeyInfo *tmp = NULL;
 
-      *matches_endp = tmp = crypt_copy_key(k);
+      tmp = crypt_copy_key(k);
+      *matches_endp = tmp;
       matches_endp = &tmp->next;
 
       if (this_key_has_strong)
@@ -4658,7 +4661,8 @@ static struct CryptKeyInfo *crypt_getkeybystr(char *p, short abilities,
 
       mutt_debug(5, "match.\n");
 
-      *matches_endp = tmp = crypt_copy_key(k);
+      tmp = crypt_copy_key(k);
+      *matches_endp = tmp;
       matches_endp = &tmp->next;
     }
     else
index 10f0bc152dd6c9a69fc7f84e6f15bd693da6d7c3..07ac6a2e98d8df6705e0d1330523a983e8fdb67c 100644 (file)
@@ -80,7 +80,7 @@ static void fix_uid(char *uid)
   char *s = NULL, *d = NULL;
   iconv_t cd;
 
-  for (s = d = uid; *s;)
+  for (s = uid, d = uid; *s;)
   {
     if (*s == '\\' && *(s + 1) == 'x' && isxdigit((unsigned char) *(s + 2)) &&
         isxdigit((unsigned char) *(s + 3)))
@@ -435,7 +435,8 @@ struct PgpKeyInfo *pgp_get_candidates(enum PgpRing keyring, struct ListHead *hin
     {
       if (k)
         kend = &k->next;
-      *kend = k = kk;
+      *kend = kk;
+      k = kk;
 
       if (is_sub)
       {
index 2cc95be62aca0eaed0a59bdddc28109f6520b907..c57414c68fbd3b2d0ed180b712617da88fef685e 100644 (file)
@@ -1188,7 +1188,8 @@ static int parse_overview_line(char *line, void *data)
     mx_alloc_memory(ctx);
 
   /* parse header */
-  hdr = ctx->hdrs[ctx->msgcount] = mutt_header_new();
+  ctx->hdrs[ctx->msgcount] = mutt_header_new();
+  hdr = ctx->hdrs[ctx->msgcount];
   hdr->env = mutt_rfc822_read_header(fp, hdr, false, false);
   hdr->env->newsgroups = mutt_str_strdup(nntp_data->group);
   hdr->received = hdr->date_sent;
@@ -1206,7 +1207,8 @@ static int parse_overview_line(char *line, void *data)
     {
       mutt_debug(2, "mutt_hcache_fetch %s\n", buf);
       mutt_header_free(&hdr);
-      ctx->hdrs[ctx->msgcount] = hdr = mutt_hcache_restore(hdata);
+      hdr = mutt_hcache_restore(hdata);
+      ctx->hdrs[ctx->msgcount] = hdr;
       mutt_hcache_free(fc->hc, &hdata);
       hdr->data = NULL;
       hdr->read = false;
@@ -1375,7 +1377,8 @@ static int nntp_fetch_headers(struct Context *ctx, void *hc, anum_t first,
     if (hdata)
     {
       mutt_debug(2, "mutt_hcache_fetch %s\n", buf);
-      ctx->hdrs[ctx->msgcount] = hdr = mutt_hcache_restore(hdata);
+      hdr = mutt_hcache_restore(hdata);
+      ctx->hdrs[ctx->msgcount] = hdr;
       mutt_hcache_free(fc.hc, &hdata);
       hdr->data = NULL;
 
@@ -1448,7 +1451,8 @@ static int nntp_fetch_headers(struct Context *ctx, void *hc, anum_t first,
       }
 
       /* parse header */
-      hdr = ctx->hdrs[ctx->msgcount] = mutt_header_new();
+      ctx->hdrs[ctx->msgcount] = mutt_header_new();
+      hdr = ctx->hdrs[ctx->msgcount];
       hdr->env = mutt_rfc822_read_header(fp, hdr, false, false);
       hdr->received = hdr->date_sent;
       mutt_file_fclose(&fp);
@@ -2032,7 +2036,8 @@ static int check_mailbox(struct Context *ctx)
         if (ctx->msgcount >= ctx->hdrmax)
           mx_alloc_memory(ctx);
 
-        ctx->hdrs[ctx->msgcount] = hdr = mutt_hcache_restore(hdata);
+        hdr = mutt_hcache_restore(hdata);
+        ctx->hdrs[ctx->msgcount] = hdr;
         mutt_hcache_free(hc, &hdata);
         hdr->data = NULL;
         if (hdr->deleted)
@@ -2471,7 +2476,8 @@ int nntp_check_msgid(struct Context *ctx, const char *msgid)
   /* parse header */
   if (ctx->msgcount == ctx->hdrmax)
     mx_alloc_memory(ctx);
-  struct Header *hdr = ctx->hdrs[ctx->msgcount] = mutt_header_new();
+  ctx->hdrs[ctx->msgcount] = mutt_header_new();
+  struct Header *hdr = ctx->hdrs[ctx->msgcount];
   hdr->data = mutt_mem_calloc(1, sizeof(struct NntpHeaderData));
   hdr->env = mutt_rfc822_read_header(fp, hdr, false, false);
   mutt_file_fclose(&fp);
index a216745f91a6b3c67cdeb781d9c01aa3387012fe..93fa85fc0199145332d19c7e249786063cdfe8bc 100644 (file)
@@ -770,7 +770,8 @@ static void apply_exclude_tags(notmuch_query_t *query)
 
     mutt_debug(2, "nm: query exclude tag '%s'\n", tag);
     notmuch_query_add_tag_exclude(query, tag);
-    end = tag = NULL;
+    end = NULL;
+    tag = NULL;
   }
   notmuch_query_set_omit_excluded(query, 1);
   FREE(&buf);
@@ -1446,7 +1447,8 @@ static int update_tags(notmuch_message_t *msg, const char *tags)
       mutt_debug(1, "nm: add tag: '%s'\n", (*tag == '+') ? tag + 1 : tag);
       notmuch_message_add_tag(msg, (*tag == '+') ? tag + 1 : tag);
     }
-    end = tag = NULL;
+    end = NULL;
+    tag = NULL;
   }
 
   notmuch_message_thaw(msg);
@@ -1511,7 +1513,8 @@ static int update_header_flags(struct Context *ctx, struct Header *hdr, const ch
       else if (strcmp(tag, "flagged") == 0)
         mutt_set_flag(ctx, hdr, MUTT_FLAG, 1);
     }
-    end = tag = NULL;
+    end = NULL;
+    tag = NULL;
   }
 
   FREE(&buf);
@@ -2661,7 +2664,8 @@ static int nm_mbox_sync(struct Context *ctx, int *index_hint)
     if (!ctx->quiet)
       mutt_progress_update(&progress, i, -1);
 
-    *old = *new = '\0';
+    *old = '\0';
+    *new = '\0';
 
     if (hd->oldpath)
     {
diff --git a/pager.c b/pager.c
index 4f3b6e75cba4a7c6b51d7609c17d9e4dd64569e1..c2ef567861cef743f039afc5bf51ac629ff3fa9a 100644 (file)
--- a/pager.c
+++ b/pager.c
@@ -1582,7 +1582,8 @@ static int display_line(FILE *f, LOFF_T *last_pos, struct Line **line_info, int
       (*line_info)[ch].type = -1;
       (*line_info)[ch].search_cnt = -1;
       (*line_info)[ch].syntax = mutt_mem_malloc(sizeof(struct Syntax));
-      ((*line_info)[ch].syntax)[0].first = ((*line_info)[ch].syntax)[0].last = -1;
+      ((*line_info)[ch].syntax)[0].first = -1;
+      ((*line_info)[ch].syntax)[0].last = -1;
     }
   }
 
@@ -1939,7 +1940,8 @@ static void pager_menu_redraw(struct Menu *pager_menu)
 
     memcpy(rd->pager_window, MuttIndexWindow, sizeof(struct MuttWindow));
     memcpy(rd->pager_status_window, MuttStatusWindow, sizeof(struct MuttWindow));
-    rd->index_status_window->rows = rd->index_window->rows = 0;
+    rd->index_status_window->rows = 0;
+    rd->index_window->rows = 0;
 
     if (IsHeader(rd->extra) && PagerIndexLines)
     {
@@ -2094,7 +2096,8 @@ static void pager_menu_redraw(struct Menu *pager_menu)
     do
     {
       mutt_window_move(rd->pager_window, 0, 0);
-      rd->curline = rd->oldtopline = rd->topline;
+      rd->curline = rd->topline;
+      rd->oldtopline = rd->topline;
       rd->lines = 0;
       rd->force_redraw = false;
 
@@ -2286,7 +2289,8 @@ int mutt_pager(const char *banner, const char *fname, int flags, struct Pager *e
     rd.line_info[i].type = -1;
     rd.line_info[i].search_cnt = -1;
     rd.line_info[i].syntax = mutt_mem_malloc(sizeof(struct Syntax));
-    (rd.line_info[i].syntax)[0].first = (rd.line_info[i].syntax)[0].last = -1;
+    (rd.line_info[i].syntax)[0].first = -1;
+    (rd.line_info[i].syntax)[0].last = -1;
   }
 
   mutt_compile_help(helpstr, sizeof(helpstr), MENU_PAGER, PagerHelp);
index 2c039bd19b00b40fc337941de8c64302c7e5f2b4..ba6e63503230293eb0db8aee290e83cb17a2ab6c 100644 (file)
--- a/pattern.c
+++ b/pattern.c
@@ -448,9 +448,12 @@ static void adjust_date_range(struct tm *min, struct tm *max)
     min->tm_mday = max->tm_mday;
     max->tm_mday = tmp;
 
-    min->tm_hour = min->tm_min = min->tm_sec = 0;
+    min->tm_hour = 0;
+    min->tm_min = 0;
+    min->tm_sec = 0;
     max->tm_hour = 23;
-    max->tm_min = max->tm_sec = 59;
+    max->tm_min = 59;
+    max->tm_sec = 59;
   }
 }
 
@@ -523,7 +526,8 @@ static bool eat_date(struct Pattern *pat, struct Buffer *s, struct Buffer *err)
         exact++;
     }
     tm->tm_hour = 23;
-    tm->tm_min = tm->tm_sec = 59;
+    tm->tm_min = 59;
+    tm->tm_sec = 59;
 
     /* force negative offset */
     get_offset(tm, buffer.data + 1, -1);
@@ -532,7 +536,9 @@ static bool eat_date(struct Pattern *pat, struct Buffer *s, struct Buffer *err)
     {
       /* start at the beginning of the day in question */
       memcpy(&min, &max, sizeof(max));
-      min.tm_hour = min.tm_sec = min.tm_min = 0;
+      min.tm_hour = 0;
+      min.tm_sec = 0;
+      min.tm_min = 0;
     }
   }
   else
@@ -571,7 +577,9 @@ static bool eat_date(struct Pattern *pat, struct Buffer *s, struct Buffer *err)
         struct tm *tm = localtime(&now);
         memcpy(&base_min, &min, sizeof(base_min));
         memcpy(&min, tm, sizeof(min));
-        min.tm_hour = min.tm_sec = min.tm_min = 0;
+        min.tm_hour = 0;
+        min.tm_sec = 0;
+        min.tm_min = 0;
       }
 
       /* preset max date for relative offsets,
@@ -876,7 +884,8 @@ static int eat_range_by_regex(struct Pattern *pat, struct Buffer *s, int kind,
       mutt_str_strfcpy(err->data, _("No current message"), err->dsize);
       return RANGE_E_CTX;
     }
-    pat->min = pat->max = CTX_MSGNO(Context);
+    pat->max = CTX_MSGNO(Context);
+    pat->min = pat->max;
   }
 
   /* Since we don't enforce order, we must swap bounds if they're backward */
index 8e969d7a47610a8a0630dc5098e9c1aeac059ab2..ade7b0e40872d016c60e1bf411abae9ece1a208f 100644 (file)
--- a/pop/pop.c
+++ b/pop/pop.c
@@ -904,7 +904,8 @@ void pop_fetch_mail(void)
     return;
   }
 
-  url = p = mutt_mem_calloc(strlen(PopHost) + 7, sizeof(char));
+  p = mutt_mem_calloc(strlen(PopHost) + 7, sizeof(char));
+  url = p;
   if (url_check_scheme(PopHost) == U_UNKNOWN)
   {
     strcpy(url, "pop://");
diff --git a/query.c b/query.c
index cecc89f43fb5666e35f28c080b7d9fbaaa74e0d6..b6b317aaf1967e21c5f4257b6d6f9b0a4276692c 100644 (file)
--- a/query.c
+++ b/query.c
@@ -369,7 +369,8 @@ static void query_menu(char *buf, size_t buflen, struct Query *results, bool ret
     for (queryp = results; queryp; queryp = queryp->next)
       menu->max++;
 
-    menu->data = QueryTable = mutt_mem_calloc(menu->max, sizeof(struct Entry));
+    QueryTable = mutt_mem_calloc(menu->max, sizeof(struct Entry));
+    menu->data = QueryTable;
 
     int i;
     for (i = 0, queryp = results; queryp; queryp = queryp->next, i++)
index 6049c543a7ff182ef494d2868eae569498559d22..e4560d6973f78e28d7929f3cefd2e44d0e944bdb 100644 (file)
@@ -108,7 +108,8 @@ static void mutt_update_v2r(struct AttachCtx *actx)
 {
   int vindex, rindex, curlevel;
 
-  vindex = rindex = 0;
+  vindex = 0;
+  rindex = 0;
 
   while (rindex < actx->idxlen)
   {
@@ -1132,7 +1133,8 @@ static void mutt_generate_recvattach_list(struct AttachCtx *actx, struct Header
 
   for (; m; m = m->next)
   {
-    need_secured = secured = 0;
+    need_secured = 0;
+    secured = 0;
 
     if (((WithCrypto & APPLICATION_SMIME) != 0) && mutt_is_application_smime(m))
     {
index a07caba9bbdb1f0735110755874cffd7a0afb172..611f33b967a3e1254b4d8f2781c2efd8d63bf966 100644 (file)
@@ -294,7 +294,8 @@ static void mix_screen_coordinates(struct Remailer **type2_list, struct Coord **
 
     if (c >= MuttIndexWindow->cols)
     {
-      oc = c = MIX_HOFFSET;
+      oc = MIX_HOFFSET;
+      c = MIX_HOFFSET;
       r++;
     }
 
diff --git a/send.c b/send.c
index eea50f3a295a837d892489ea380564ac555ac6ee..26e88bdb1ea4b848ed06225ef5df60813353ac50 100644 (file)
--- a/send.c
+++ b/send.c
@@ -203,7 +203,10 @@ static struct Address *remove_user(struct Address *a, bool leave_only)
         last = last->next;
       }
       else
-        last = top = a;
+      {
+        last = a;
+        top = a;
+      }
       a = a->next;
       last->next = NULL;
     }
@@ -218,7 +221,10 @@ static struct Address *remove_user(struct Address *a, bool leave_only)
         mutt_addr_free(&tmp);
       }
       else
-        last = top = tmp;
+      {
+        last = tmp;
+        top = tmp;
+      }
     }
   }
   return top;
@@ -246,7 +252,10 @@ static struct Address *find_mailing_lists(struct Address *t, struct Address *c)
           ptr = ptr->next;
         }
         else
-          ptr = top = mutt_addr_copy(t);
+        {
+          top = mutt_addr_copy(t);
+          ptr = top;
+        }
       }
     }
   }
@@ -1078,7 +1087,10 @@ static int generate_body(FILE *tempfp, struct Header *msg, int flags,
             last = tmp;
           }
           else
-            last = msg->content = tmp;
+          {
+            last = tmp;
+            msg->content = tmp;
+          }
         }
       }
     }
index 840a00926a01ad074923def90323964ad1102d4c..76bc024ebd245dee1dae1e325865186bbc12ed29 100644 (file)
--- a/sendlib.c
+++ b/sendlib.c
@@ -2139,7 +2139,9 @@ int mutt_write_one_header(FILE *fp, const char *tag, const char *value,
     }
   }
 
-  p = last = line = (char *) v;
+  p = v;
+  last = v;
+  line = v;
   while (p && *p)
   {
     p = strchr(p, '\n');
index 94a7b4a34771ca1c42f95bb8cbde6a73ef6ebf84..1dfb1c2606d8cda0081de76a1c3d5605e89d689b 100644 (file)
--- a/sidebar.c
+++ b/sidebar.c
@@ -651,7 +651,8 @@ static bool prepare_sidebar(int page_size)
    * need to scan for the framing interval */
   if (SidebarNewMailOnly)
   {
-    TopIndex = BotIndex = -1;
+    TopIndex = -1;
+    BotIndex = -1;
     while (BotIndex < HilIndex)
     {
       TopIndex = BotIndex + 1;
diff --git a/smtp.c b/smtp.c
index 2903368c65bbd914d542e98190eb197f17dcde17..3d1cc860fbb44800c4db67d79f5dc5cfa276be24 100644 (file)
--- a/smtp.c
+++ b/smtp.c
@@ -580,7 +580,7 @@ static int smtp_auth_plain(struct Connection *conn)
   }
 
   /* Check if any elements in SmtpAuthenticators is "plain" */
-  for (method = delim = SmtpAuthenticators;
+  for (method = SmtpAuthenticators, delim = SmtpAuthenticators;
        *delim && (delim = mutt_str_strchrnul(method, ':')); method = delim + 1)
   {
     if (mutt_str_strncasecmp(method, "plain", 5) == 0)