From: Federico Kircheis Date: Sat, 3 Mar 2018 08:38:37 +0000 (+0100) Subject: Reduce variable scope - keymap.c X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=f398bb4e034150ef315ae9412c6921add0400287;p=neomutt Reduce variable scope - keymap.c --- diff --git a/keymap.c b/keymap.c index d87c0906b..fd204dc55 100644 --- a/keymap.c +++ b/keymap.c @@ -652,7 +652,6 @@ static const char *km_keyname(int c) int km_expand_key(char *s, size_t len, struct Keymap *map) { - size_t l; int p = 0; if (!map) @@ -661,7 +660,8 @@ int km_expand_key(char *s, size_t len, struct Keymap *map) while (true) { mutt_str_strfcpy(s, km_keyname(map->keys[p]), len); - len -= (l = mutt_str_strlen(s)); + const size_t l = mutt_str_strlen(s); + len -= l; if (++p >= map->len || !len) return 1;