Skip to content

Commit 2430125

Browse files
Sreya1gregkh
authored andcommitted
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 <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
1 parent 4cb3150 commit 2430125

File tree

1 file changed

+4
-6
lines changed

1 file changed

+4
-6
lines changed

drivers/staging/speakup/keyhelp.c

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -163,17 +163,15 @@ int spk_handle_help(struct vc_data *vc, u_char type, u_char ch, u_short key)
163163
}
164164
cur_item = letter_offsets[ch - 'a'];
165165
} else if (type == KT_CUR) {
166-
if (ch == 0
167-
&& (MSG_FUNCNAMES_START + cur_item + 1) <=
168-
MSG_FUNCNAMES_END)
166+
if (ch == 0 &&
167+
(MSG_FUNCNAMES_START + cur_item + 1) <= MSG_FUNCNAMES_END)
169168
cur_item++;
170169
else if (ch == 3 && cur_item > 0)
171170
cur_item--;
172171
else
173172
return -1;
174-
} else if (type == KT_SPKUP
175-
&& ch == SPEAKUP_HELP
176-
&& !spk_special_handler) {
173+
} else if (type == KT_SPKUP && ch == SPEAKUP_HELP &&
174+
!spk_special_handler) {
177175
spk_special_handler = spk_handle_help;
178176
synth_printf("%s\n", spk_msg_get(MSG_HELP_INFO));
179177
build_key_data(); /* rebuild each time in case new mapping */

0 commit comments

Comments
 (0)