From 79f342b954a6f47ee3f1277a899066a654e7c330 Mon Sep 17 00:00:00 2001 From: Kurtis Rader Date: Wed, 4 May 2016 15:19:47 -0700 Subject: lint cleanup: eliminate "redundant" errors This removes some pointless parentheses but the primary focus is removing redundancies like unnecessary "else" clauses. --- src/input.cpp | 23 +++++++++++------------ 1 file changed, 11 insertions(+), 12 deletions(-) (limited to 'src/input.cpp') diff --git a/src/input.cpp b/src/input.cpp index 0740a113..efe2f594 100644 --- a/src/input.cpp +++ b/src/input.cpp @@ -535,13 +535,12 @@ static bool input_mapping_is_match(const input_mapping_t &m) { // m.command.c_str()); // We matched the entire sequence. return true; - } else { - int k; - // Return the read characters. - input_common_next_ch(c); - for (k = j - 1; k >= 0; k--) { - input_common_next_ch(m.seq[k]); - } + } + + // Return the read characters. + input_common_next_ch(c); + for (int k = j - 1; k >= 0; k--) { + input_common_next_ch(m.seq[k]); } return false; @@ -630,12 +629,12 @@ wint_t input_readch(bool allow_commands) { case R_AND: { if (input_function_status) { return input_readch(); - } else { - while ((c = input_common_readch(0)) && c >= R_MIN && c <= R_MAX) - ; - input_common_next_ch(c); - return input_readch(); } + while ((c = input_common_readch(0)) && c >= R_MIN && c <= R_MAX) { + // do nothing + } + input_common_next_ch(c); + return input_readch(); } default: { return c; } } -- cgit v1.2.3