From: Federico Kircheis Date: Mon, 5 Mar 2018 17:34:51 +0000 (+0100) Subject: Reduce variable scope - mutt/base64.c X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=63e07b137b6cfe91ab5942f6ce74e2ae27bb05f1;p=neomutt Reduce variable scope - mutt/base64.c --- diff --git a/mutt/base64.c b/mutt/base64.c index 352cbd48c..a73ca3233 100644 --- a/mutt/base64.c +++ b/mutt/base64.c @@ -138,17 +138,17 @@ size_t mutt_b64_encode(char *out, const char *cin, size_t len, size_t olen) int mutt_b64_decode(char *out, const char *in) { int len = 0; - unsigned char digit1, digit2, digit3, digit4; + unsigned char digit4; do { - digit1 = in[0]; + const unsigned char digit1 = in[0]; if ((digit1 > 127) || (base64val(digit1) == BAD)) return -1; - digit2 = in[1]; + const unsigned char digit2 = in[1]; if ((digit2 > 127) || (base64val(digit2) == BAD)) return -1; - digit3 = in[2]; + const unsigned char digit3 = in[2]; if ((digit3 > 127) || ((digit3 != '=') && (base64val(digit3) == BAD))) return -1; digit4 = in[3];