Browse Source

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 <amsfield22@gmail.com>
Acked-by: Julia Lawall <julia.lawall@lip6.fr>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Alison Schofield 9 years ago
parent
commit
5a41b93476
1 changed files with 1 additions and 4 deletions
  1. 1 4
      drivers/staging/speakup/i18n.c

+ 1 - 4
drivers/staging/speakup/i18n.c

@@ -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];
 }
 
 /*