Skip to content
Commit a579c978 authored by Mahati Chamarthy's avatar Mahati Chamarthy Committed by Greg Kroah-Hartman
Browse files

Staging: media: lirc: Merge two lines and remove unused variable



This patch merges an assignment with an immediately following return of
the assigned variable. It also removes a variable that becomes unused due to this transformation.
The following Coccinelle semantic patch was used to make this transformation:

@r@
identifier ret;
identifier f;
@@

-ret =
+return
     f(...);
-return ret;

@@
identifier r.ret;
expression e1;
type t;
@@

(
-t ret = e1;
|
-t ret;
)
 ... when != ret
     when strict

Signed-off-by: default avatarMahati Chamarthy <mahati.chamarthy@gmail.com>
Acked-by: default avatarJulia Lawall <julia.lawall@lip6.fr>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 707505b5
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment