Skip to content

Commit

Permalink
Reduce variable scope - keymap.c
Browse files Browse the repository at this point in the history
  • Loading branch information
fekir authored and flatcap committed Mar 3, 2018
1 parent d30ed15 commit f398bb4
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions keymap.c
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand All @@ -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;
Expand Down

0 comments on commit f398bb4

Please sign in to comment.