From: Federico Kircheis Date: Fri, 2 Mar 2018 18:32:28 +0000 (+0100) Subject: Reduce variable scope and avoid conversion X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=f0cfa8de245a9f5dbe92cf091d3826bd304930f9;p=neomutt Reduce variable scope and avoid conversion --- diff --git a/handler.c b/handler.c index d1ed178cc..afe60c744 100644 --- 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) {