diff options
author | Sreya Mittal <sreyamittal5@gmail.com> | 2017-03-01 02:38:13 +0530 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2017-03-06 09:39:54 +0100 |
commit | 2430125c1ff167cb19029b0790501a2a1a24a326 (patch) | |
tree | 045ee2e0498454143c2bc1d596e426f2e8984656 /drivers/staging/speakup | |
parent | 4cb3150a8c2d1f74c67f22ecd71070a0dafcb64f (diff) |
staging: speakup: Clean up if conditions
Found by checkpatch.pl
Logical conditions are on the next line, useless parentheses present
Clean up the if tests by
* Put logical conditions on the previous line
* Line up the tests
Signed-off-by: Sreya Mittal <sreyamittal5@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/staging/speakup')
-rw-r--r-- | drivers/staging/speakup/keyhelp.c | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/drivers/staging/speakup/keyhelp.c b/drivers/staging/speakup/keyhelp.c index f5156bba4d55..4e6e5daba50c 100644 --- a/drivers/staging/speakup/keyhelp.c +++ b/drivers/staging/speakup/keyhelp.c @@ -163,17 +163,15 @@ int spk_handle_help(struct vc_data *vc, u_char type, u_char ch, u_short key) } cur_item = letter_offsets[ch - 'a']; } else if (type == KT_CUR) { - if (ch == 0 - && (MSG_FUNCNAMES_START + cur_item + 1) <= - MSG_FUNCNAMES_END) + if (ch == 0 && + (MSG_FUNCNAMES_START + cur_item + 1) <= MSG_FUNCNAMES_END) cur_item++; else if (ch == 3 && cur_item > 0) cur_item--; else return -1; - } else if (type == KT_SPKUP - && ch == SPEAKUP_HELP - && !spk_special_handler) { + } else if (type == KT_SPKUP && ch == SPEAKUP_HELP && + !spk_special_handler) { spk_special_handler = spk_handle_help; synth_printf("%s\n", spk_msg_get(MSG_HELP_INFO)); build_key_data(); /* rebuild each time in case new mapping */ |