]> granicus.if.org Git - neomutt/commitdiff
build: fix shadow variable warning
authorRichard Russon <rich@flatcap.org>
Thu, 26 Oct 2017 14:44:52 +0000 (15:44 +0100)
committerRichard Russon <rich@flatcap.org>
Tue, 7 Nov 2017 13:48:46 +0000 (13:48 +0000)
ncrypt/crypt.c
newsrc.c

index 63df292f0a5517dffaaa924a4e8519b7496f611f..8065b72770f38d9416b6189faa8366d3b8c9d2bd 100644 (file)
@@ -713,38 +713,38 @@ void crypt_extract_keys_from_messages(struct Header *h)
       if (!message_is_tagged(Context, i))
         continue;
 
-      struct Header *h = Context->hdrs[i];
+      struct Header *hi = Context->hdrs[i];
 
-      mutt_parse_mime_message(Context, h);
-      if (h->security & ENCRYPT && !crypt_valid_passphrase(h->security))
+      mutt_parse_mime_message(Context, hi);
+      if (hi->security & ENCRYPT && !crypt_valid_passphrase(hi->security))
       {
         safe_fclose(&fpout);
         break;
       }
 
-      if ((WithCrypto & APPLICATION_PGP) && (h->security & APPLICATION_PGP))
+      if ((WithCrypto & APPLICATION_PGP) && (hi->security & APPLICATION_PGP))
       {
-        mutt_copy_message(fpout, Context, h, MUTT_CM_DECODE | MUTT_CM_CHARCONV, 0);
+        mutt_copy_message(fpout, Context, hi, MUTT_CM_DECODE | MUTT_CM_CHARCONV, 0);
         fflush(fpout);
 
         mutt_endwin(_("Trying to extract PGP keys...\n"));
         crypt_pgp_invoke_import(tempfname);
       }
 
-      if ((WithCrypto & APPLICATION_SMIME) && (h->security & APPLICATION_SMIME))
+      if ((WithCrypto & APPLICATION_SMIME) && (hi->security & APPLICATION_SMIME))
       {
-        if (h->security & ENCRYPT)
-          mutt_copy_message(fpout, Context, h,
+        if (hi->security & ENCRYPT)
+          mutt_copy_message(fpout, Context, hi,
                             MUTT_CM_NOHEADER | MUTT_CM_DECODE_CRYPT | MUTT_CM_DECODE_SMIME,
                             0);
         else
-          mutt_copy_message(fpout, Context, h, 0, 0);
+          mutt_copy_message(fpout, Context, hi, 0, 0);
         fflush(fpout);
 
-        if (h->env->from)
-          tmp = mutt_expand_aliases(h->env->from);
-        else if (h->env->sender)
-          tmp = mutt_expand_aliases(h->env->sender);
+        if (hi->env->from)
+          tmp = mutt_expand_aliases(hi->env->from);
+        else if (hi->env->sender)
+          tmp = mutt_expand_aliases(hi->env->sender);
         mbox = tmp ? tmp->mailbox : NULL;
         if (mbox)
         {
index b1ce4c653c39f80a2fa612a4b0f0b4750a5ac9d0..ce8925ac1b4465edc63c325e7efa1ccd1a000749 100644 (file)
--- a/newsrc.c
+++ b/newsrc.c
@@ -460,20 +460,20 @@ int nntp_newsrc_update(struct NntpServer *nserv)
     off += strlen(buf + off);
 
     /* write entries */
-    for (unsigned int i = 0; i < nntp_data->newsrc_len; i++)
+    for (unsigned int j = 0; j < nntp_data->newsrc_len; j++)
     {
       if (off + LONG_STRING > buflen)
       {
         buflen *= 2;
         safe_realloc(&buf, buflen);
       }
-      if (i)
+      if (j)
         buf[off++] = ',';
-      if (nntp_data->newsrc_ent[i].first == nntp_data->newsrc_ent[i].last)
-        snprintf(buf + off, buflen - off, "%d", nntp_data->newsrc_ent[i].first);
-      else if (nntp_data->newsrc_ent[i].first < nntp_data->newsrc_ent[i].last)
+      if (nntp_data->newsrc_ent[j].first == nntp_data->newsrc_ent[j].last)
+        snprintf(buf + off, buflen - off, "%d", nntp_data->newsrc_ent[j].first);
+      else if (nntp_data->newsrc_ent[j].first < nntp_data->newsrc_ent[j].last)
         snprintf(buf + off, buflen - off, "%d-%d",
-                 nntp_data->newsrc_ent[i].first, nntp_data->newsrc_ent[i].last);
+                 nntp_data->newsrc_ent[j].first, nntp_data->newsrc_ent[j].last);
       off += strlen(buf + off);
     }
     buf[off++] = '\n';