Skip to content

Commit

Permalink
netfilter: remove unnecessary returns from void function()s
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Joe Perches authored and Patrick McHardy committed May 13, 2010
1 parent 654d0fb commit 736d58e
Show file tree
Hide file tree
Showing 5 changed files with 0 additions and 5 deletions.
1 change: 0 additions & 1 deletion net/ipv4/netfilter/ip_queue.c
Original file line number Diff line number Diff line change
Expand Up @@ -461,7 +461,6 @@ __ipq_rcv_skb(struct sk_buff *skb)

if (flags & NLM_F_ACK)
netlink_ack(skb, nlh, 0);
return;
}

static void
Expand Down
1 change: 0 additions & 1 deletion net/ipv6/netfilter/ip6_queue.c
Original file line number Diff line number Diff line change
Expand Up @@ -462,7 +462,6 @@ __ipq_rcv_skb(struct sk_buff *skb)

if (flags & NLM_F_ACK)
netlink_ack(skb, nlh, 0);
return;
}

static void
Expand Down
1 change: 0 additions & 1 deletion net/netfilter/nf_conntrack_netlink.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
1 change: 0 additions & 1 deletion net/netfilter/nf_queue.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);

Expand Down
1 change: 0 additions & 1 deletion net/netfilter/xt_time.c
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,6 @@ static void localtime_3(struct xtm *r, time_t time)
}

r->month = i + 1;
return;
}

static bool
Expand Down

0 comments on commit 736d58e

Please sign in to comment.