Commit 736d58e3a2245ac2779fe0f278f8735bcf33ca8d

Authored by Joe Perches
Committed by Patrick McHardy
1 parent 654d0fbdc8

netfilter: remove unnecessary returns from void function()s

This patch removes from net/ netfilter files
all the unnecessary return; statements that precede the
last closing brace of void functions.

It does not remove the returns that are immediately
preceded by a label as gcc doesn't like that.

Done via:
$ grep -rP --include=*.[ch] -l "return;\n}" net/ | \
  xargs perl -i -e 'local $/ ; while (<>) { s/\n[ \t\n]+return;\n}/\n}/g; print; }'

Signed-off-by: Joe Perches <joe@perches.com>
[Patrick: changed to keep return statements in otherwise empty function bodies]
Signed-off-by: Patrick McHardy <kaber@trash.net>

Showing 5 changed files with 0 additions and 5 deletions Side-by-side Diff

net/ipv4/netfilter/ip_queue.c
... ... @@ -461,7 +461,6 @@
461 461  
462 462 if (flags & NLM_F_ACK)
463 463 netlink_ack(skb, nlh, 0);
464   - return;
465 464 }
466 465  
467 466 static void
net/ipv6/netfilter/ip6_queue.c
... ... @@ -462,7 +462,6 @@
462 462  
463 463 if (flags & NLM_F_ACK)
464 464 netlink_ack(skb, nlh, 0);
465   - return;
466 465 }
467 466  
468 467 static void
net/netfilter/nf_conntrack_netlink.c
... ... @@ -2109,7 +2109,6 @@
2109 2109  
2110 2110 nfnetlink_subsys_unregister(&ctnl_exp_subsys);
2111 2111 nfnetlink_subsys_unregister(&ctnl_subsys);
2112   - return;
2113 2112 }
2114 2113  
2115 2114 module_init(ctnetlink_init);
net/netfilter/nf_queue.c
... ... @@ -279,7 +279,6 @@
279 279 }
280 280 rcu_read_unlock();
281 281 kfree(entry);
282   - return;
283 282 }
284 283 EXPORT_SYMBOL(nf_reinject);
285 284  
net/netfilter/xt_time.c
... ... @@ -148,7 +148,6 @@
148 148 }
149 149  
150 150 r->month = i + 1;
151   - return;
152 151 }
153 152  
154 153 static bool