staging: speakup: compress return logic into one line
authorAlison Schofield <amsfield22@gmail.com>
Wed, 10 Feb 2016 18:57:31 +0000 (10:57 -0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 12 Feb 2016 04:00:30 +0000 (20:00 -0800)
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 <amsfield22@gmail.com>
Acked-by: Julia Lawall <julia.lawall@lip6.fr>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/speakup/i18n.c

index 12f880ed4ddfc7d13a0566c21baf0e8ac7aaff57..8960079e4d606b2672dbd7c69b2740efa5cdb0ca 100644 (file)
@@ -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];
 }
 
 /*
This page took 0.040384 seconds and 5 git commands to generate.