This patch uses the following coccinelle script to remove
a variable that was simply used to store the return
value of a function call before returning it:
@@
identifier len,f;
@@
-int len;
... when != len
when strict
-len =
+return
f(...);
-return len;
Signed-off-by: Arushi Singhal <redacted>
---
net/netfilter/ipvs/ip_vs_ftp.c | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
@@ -482,11 +482,9 @@ static struct pernet_operations ip_vs_ftp_ops = {staticint__initip_vs_ftp_init(void){-intrv;-rv=register_pernet_subsys(&ip_vs_ftp_ops);/* rcu_barrier() is called by netns on error */-returnrv;+returnregister_pernet_subsys(&ip_vs_ftp_ops);}/*
From: Julia Lawall <hidden> Date: 2017-03-29 14:16:43
On Wed, 29 Mar 2017, Arushi Singhal wrote:
quoted hunk
This patch uses the following coccinelle script to remove
a variable that was simply used to store the return
value of a function call before returning it:
@@
identifier len,f;
@@
-int len;
... when != len
when strict
-len =
+return
f(...);
-return len;
Signed-off-by: Arushi Singhal <redacted>
---
net/netfilter/ipvs/ip_vs_ftp.c | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
@@ -482,11 +482,9 @@ static struct pernet_operations ip_vs_ftp_ops = {staticint__initip_vs_ftp_init(void){-intrv;-rv=register_pernet_subsys(&ip_vs_ftp_ops);/* rcu_barrier() is called by netns on error */-returnrv;+returnregister_pernet_subsys(&ip_vs_ftp_ops);
It looks like you end up with an unnecessary blank line at the beginning
of the function.
julia