]> bbs.cooldavid.org Git - net-next-2.6.git/commitdiff
netfilter: remove unnecessary returns from void function()s
authorJoe Perches <joe@perches.com>
Thu, 13 May 2010 13:16:27 +0000 (15:16 +0200)
committerPatrick McHardy <kaber@trash.net>
Thu, 13 May 2010 13:16:27 +0000 (15:16 +0200)
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>
net/ipv4/netfilter/ip_queue.c
net/ipv6/netfilter/ip6_queue.c
net/netfilter/nf_conntrack_netlink.c
net/netfilter/nf_queue.c
net/netfilter/xt_time.c

index c838238104f5d20f743e8c3b3f142c879edfcbe4..a4e5fc5df4bfd31aef2ed606fe475e7cfc15559d 100644 (file)
@@ -461,7 +461,6 @@ __ipq_rcv_skb(struct sk_buff *skb)
 
        if (flags & NLM_F_ACK)
                netlink_ack(skb, nlh, 0);
-       return;
 }
 
 static void
index 8656eb75520c07ed037489ddce6822a3c2e5a828..8c201743d96d3fe8366603fc29d071c773c07166 100644 (file)
@@ -462,7 +462,6 @@ __ipq_rcv_skb(struct sk_buff *skb)
 
        if (flags & NLM_F_ACK)
                netlink_ack(skb, nlh, 0);
-       return;
 }
 
 static void
index 961fb6a8529456e5500199bd871b007b376510bf..c42ff6aa441d657c03e2eb0207350e50b5adc239 100644 (file)
@@ -2109,7 +2109,6 @@ static void __exit ctnetlink_exit(void)
 
        nfnetlink_subsys_unregister(&ctnl_exp_subsys);
        nfnetlink_subsys_unregister(&ctnl_subsys);
-       return;
 }
 
 module_init(ctnetlink_init);
index c49ef219899edd130cad88524bf7efdf73efe916..0b1103c0b1f37bbb5a83ca6e5b5148a85eb08710 100644 (file)
@@ -279,7 +279,6 @@ void nf_reinject(struct nf_queue_entry *entry, unsigned int verdict)
        }
        rcu_read_unlock();
        kfree(entry);
-       return;
 }
 EXPORT_SYMBOL(nf_reinject);
 
index 79234bb19d05fc56a2fed75f7fa64f1f755c60d6..c48975ff8ea27c4d1e7d99ae60f67f1da94d8003 100644 (file)
@@ -148,7 +148,6 @@ static void localtime_3(struct xtm *r, time_t time)
        }
 
        r->month    = i + 1;
-       return;
 }
 
 static bool