Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 2430125c authored by Sreya Mittal's avatar Sreya Mittal Committed by Greg Kroah-Hartman
Browse files

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: default avatarSreya Mittal <sreyamittal5@gmail.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 4cb3150a
Loading
Loading
Loading
Loading
+4 −6
Original line number Original line Diff line number Diff line
@@ -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'];
		cur_item = letter_offsets[ch - 'a'];
	} else if (type == KT_CUR) {
	} else if (type == KT_CUR) {
		if (ch == 0
		if (ch == 0 &&
		    && (MSG_FUNCNAMES_START + cur_item + 1) <=
		    (MSG_FUNCNAMES_START + cur_item + 1) <= MSG_FUNCNAMES_END)
		    MSG_FUNCNAMES_END)
			cur_item++;
			cur_item++;
		else if (ch == 3 && cur_item > 0)
		else if (ch == 3 && cur_item > 0)
			cur_item--;
			cur_item--;
		else
		else
			return -1;
			return -1;
	} else if (type == KT_SPKUP
	} else if (type == KT_SPKUP && ch == SPEAKUP_HELP &&
			&& ch == SPEAKUP_HELP
		   !spk_special_handler) {
			&& !spk_special_handler) {
		spk_special_handler = spk_handle_help;
		spk_special_handler = spk_handle_help;
		synth_printf("%s\n", spk_msg_get(MSG_HELP_INFO));
		synth_printf("%s\n", spk_msg_get(MSG_HELP_INFO));
		build_key_data(); /* rebuild each time in case new mapping */
		build_key_data(); /* rebuild each time in case new mapping */