]> granicus.if.org Git - neomutt/commitdiff
Reduce variable scope and avoid conversion
authorFederico Kircheis <federico.kircheis@gmail.com>
Fri, 2 Mar 2018 18:32:28 +0000 (19:32 +0100)
committerRichard Russon <rich@flatcap.org>
Fri, 2 Mar 2018 18:32:28 +0000 (19:32 +0100)
handler.c

index d1ed178cc5605a3e6bd2b6087e8e5d596e8925b4..afe60c7447d609f384c3e58f7e6191a72ded4090 100644 (file)
--- a/handler.c
+++ b/handler.c
@@ -346,7 +346,6 @@ static unsigned char decode_byte(char ch)
 static void decode_uuencoded(struct State *s, long len, int istext, iconv_t cd)
 {
   char tmps[SHORT_STRING];
-  char linelen;
   char *pt = NULL;
   char bufi[BUFI_SIZE];
   size_t k = 0;
@@ -370,9 +369,9 @@ static void decode_uuencoded(struct State *s, long len, int istext, iconv_t cd)
     if (mutt_str_strncmp(tmps, "end", 3) == 0)
       break;
     pt = tmps;
-    linelen = decode_byte(*pt);
+    const unsigned char linelen = decode_byte(*pt);
     pt++;
-    for (char c = 0; c < linelen;)
+    for (unsigned char c = 0; c < linelen;)
     {
       for (char l = 2; l <= 6; l += 2)
       {