staging: speakup: compress return logic into one line
PATCH 1/1 staging: speakup: compress return logic into one line
Simplify function return by merging assignment and return into one command line. Remove (now) unused local variable.
Found using Coccinelle:
@@
expression e, ret;
@@
-ret =
+return
e;
-return ret;
Signed-off-by Alison Schofield <[email protected]>
--- drivers/staging/speakup/i18n.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-)
drivers/staging/speakup/i18n.c +1 -4
@@ -393,10 +393,7 @@ static const int num_groups = ARRAY_SIZE(all_groups);char *spk_msg_get (enum msg_index_t index) { -char *ch; - - ch = speakup_msgs[index]; -return ch; +return speakup_msgs[index]; }/*
Signature · 1 line
2.1.4
Quoted 11 lines · Alison Schofield
Simplify function return by merging assignment and return into one command line. Remove (now) unused local variable.
Found using Coccinelle:
@@
expression e, ret;
@@(quoted diff) +1
-1-ret = +returne;
Quoted 3 lines
-return ret;
Signed-off-by Alison Schofield <[email protected]>
Acked-by Julia Lawall <[email protected]>
Quoted 30 lines
--- drivers/staging/speakup/i18n.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-)drivers/staging/speakup/i18n.c +1
-4@@ -393,10 +393,7 @@ static const int num_groups = ARRAY_SIZE(all_groups);char *spk_msg_get (enum msg_index_t index) { -char *ch; - - ch = speakup_msgs[index]; -return ch; +return speakup_msgs[index]; }/* Signature · 8 lines
2.1.4 -- 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/20160210185723.GA15085%40d830.WORKGROUP. For more options, visit https://groups.google.com/d/optout.