Staging: speakup: Remove unnecessary else after return
PATCH 1/1 Staging: speakup: Remove unnecessary else after return
This patch fixes checkpatch.pl warning in files of speakup
WARNING: else is not generally useful after a break or return
Signed-off-by Dilek Uzulmez <[email protected]>
--- drivers/staging/speakup/keyhelp.c | 1 - 1 file changed, 1 deletion(-)
drivers/staging/speakup/keyhelp.c +0 -1
@@ -182,7 +182,6 @@ int spk_handle_help(struct vc_data *vc, u_char type, u_char ch, u_short key)synth_printf ("%s\n" ,spk_msg_get (MSG_HELP_INFO ));build_key_data ();/* rebuild each time in case new mapping */ return 1 ; - }else { name =NULL ;if ((type !=KT_SPKUP ) && (key >0 ) && (key <= num_key_names)) { synth_printf("%s\n",
Signature · 1 line
1.9.1
Quoted 13 lines · Dilek Uzulmez
This patch fixes checkpatch.pl warning in files of speakup
WARNING: else is not generally useful after a break or returnSigned-off-by Dilek Uzulmez <[email protected]>--- drivers/staging/speakup/keyhelp.c | 1 - 1 file changed, 1 deletion(-)drivers/staging/speakup/keyhelp.c +0
-0
drivers/staging/speakup/keyhelp.c int spk_handle_help(struct vc_data *vc, u_char type, u_char ch, u_short key) · line 185
Quoted 4 lines
drivers/staging/speakup/keyhelp.c +0
-1@@ -182,7 +182,6 @@ int spk_handle_help(struct vc_data *vc, u_char type, u_char ch, u_short key)synth_printf ("%s\n" ,spk_msg_get (MSG_HELP_INFO ));build_key_data ();/* rebuild each time in case new mapping */ return 1 ; - }else {
This does not look correct. You have deleted the } ending the previous then branch as well as the else and its open brace. But you have not deleted its close brace. Also the code in the else branch should be moved to the left to reflectthe fact that it is not under an if any more.
julia
Quoted 13 lines
drivers/staging/speakup/keyhelp.c +0
-0name =NULL ;if ((type !=KT_SPKUP ) && (key >0 ) && (key <= num_key_names)) { synth_printf("%s\n",Signature · 8 lines
1.9.1 -- You received this message because you are subscribed to the Google Groups "outreachy-kernel" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/outreachy-kernel/1424471596-15670-1-git-send-email-dilekuzulmez%40gmail.com. For more options, visit https://groups.google.com/d/optout.