aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJoe Perches <joe@perches.com>2010-05-13 09:16:27 -0400
committerPatrick McHardy <kaber@trash.net>2010-05-13 09:16:27 -0400
commit736d58e3a2245ac2779fe0f278f8735bcf33ca8d (patch)
tree7a0faa6b12ea56ae66dae40f8649649115247234
parent654d0fbdc8fe1041918741ed5b6abc8ad6b4c1d8 (diff)
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>
-rw-r--r--net/ipv4/netfilter/ip_queue.c1
-rw-r--r--net/ipv6/netfilter/ip6_queue.c1
-rw-r--r--net/netfilter/nf_conntrack_netlink.c1
-rw-r--r--net/netfilter/nf_queue.c1
-rw-r--r--net/netfilter/xt_time.c1
5 files changed, 0 insertions, 5 deletions
diff --git a/net/ipv4/netfilter/ip_queue.c b/net/ipv4/netfilter/ip_queue.c
index c838238104f..a4e5fc5df4b 100644
--- a/net/ipv4/netfilter/ip_queue.c
+++ b/net/ipv4/netfilter/ip_queue.c
@@ -461,7 +461,6 @@ __ipq_rcv_skb(struct sk_buff *skb)
461 461
462 if (flags & NLM_F_ACK) 462 if (flags & NLM_F_ACK)
463 netlink_ack(skb, nlh, 0); 463 netlink_ack(skb, nlh, 0);
464 return;
465} 464}
466 465
467static void 466static void
diff --git a/net/ipv6/netfilter/ip6_queue.c b/net/ipv6/netfilter/ip6_queue.c
index 8656eb75520..8c201743d96 100644
--- a/net/ipv6/netfilter/ip6_queue.c
+++ b/net/ipv6/netfilter/ip6_queue.c
@@ -462,7 +462,6 @@ __ipq_rcv_skb(struct sk_buff *skb)
462 462
463 if (flags & NLM_F_ACK) 463 if (flags & NLM_F_ACK)
464 netlink_ack(skb, nlh, 0); 464 netlink_ack(skb, nlh, 0);
465 return;
466} 465}
467 466
468static void 467static void
diff --git a/net/netfilter/nf_conntrack_netlink.c b/net/netfilter/nf_conntrack_netlink.c
index 961fb6a8529..c42ff6aa441 100644
--- a/net/netfilter/nf_conntrack_netlink.c
+++ b/net/netfilter/nf_conntrack_netlink.c
@@ -2109,7 +2109,6 @@ static void __exit ctnetlink_exit(void)
2109 2109
2110 nfnetlink_subsys_unregister(&ctnl_exp_subsys); 2110 nfnetlink_subsys_unregister(&ctnl_exp_subsys);
2111 nfnetlink_subsys_unregister(&ctnl_subsys); 2111 nfnetlink_subsys_unregister(&ctnl_subsys);
2112 return;
2113} 2112}
2114 2113
2115module_init(ctnetlink_init); 2114module_init(ctnetlink_init);
diff --git a/net/netfilter/nf_queue.c b/net/netfilter/nf_queue.c
index c49ef219899..0b1103c0b1f 100644
--- a/net/netfilter/nf_queue.c
+++ b/net/netfilter/nf_queue.c
@@ -279,7 +279,6 @@ void nf_reinject(struct nf_queue_entry *entry, unsigned int verdict)
279 } 279 }
280 rcu_read_unlock(); 280 rcu_read_unlock();
281 kfree(entry); 281 kfree(entry);
282 return;
283} 282}
284EXPORT_SYMBOL(nf_reinject); 283EXPORT_SYMBOL(nf_reinject);
285 284
diff --git a/net/netfilter/xt_time.c b/net/netfilter/xt_time.c
index 79234bb19d0..c48975ff8ea 100644
--- a/net/netfilter/xt_time.c
+++ b/net/netfilter/xt_time.c
@@ -148,7 +148,6 @@ static void localtime_3(struct xtm *r, time_t time)
148 } 148 }
149 149
150 r->month = i + 1; 150 r->month = i + 1;
151 return;
152} 151}
153 152
154static bool 153static bool