Skip to content
Commit 3dfe7557 authored by Vaishali Thakkar's avatar Vaishali Thakkar Committed by Greg Kroah-Hartman
Browse files

Staging: dgnc: Merge lines and remove unused variable for immediate return



This patch merges two lines in a single line if immediate
return is found. It also removes unnecessory variable rc
as it is no longer needed.

This is done using Coccinelle. Semantic patch used for this
is as follows:

@@
type T;
identifier i;
identifier f;
constant C;
@@
- T i;
  ...when != i
     when strict
(
  return -C;
|
- i =
+ return
     f(...);
- return i;
)

Signed-off-by: default avatarVaishali Thakkar <vthakkar1994@gmail.com>
Reviewed-by: default avatarJulia Lawall <julia.lawall@lip6.fr>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 10352c2a
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment