Skip to content

Commit 736d58e

Browse files
JoePercheskaber
authored andcommitted
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>
1 parent 654d0fb commit 736d58e

5 files changed

Lines changed: 0 additions & 5 deletions

File tree

‎net/ipv4/netfilter/ip_queue.c‎

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -461,7 +461,6 @@ __ipq_rcv_skb(struct sk_buff *skb)
461461

462462
if (flags & NLM_F_ACK)
463463
netlink_ack(skb, nlh, 0);
464-
return;
465464
}
466465

467466
static void

‎net/ipv6/netfilter/ip6_queue.c‎

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -462,7 +462,6 @@ __ipq_rcv_skb(struct sk_buff *skb)
462462

463463
if (flags & NLM_F_ACK)
464464
netlink_ack(skb, nlh, 0);
465-
return;
466465
}
467466

468467
static void

‎net/netfilter/nf_conntrack_netlink.c‎

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2109,7 +2109,6 @@ static void __exit ctnetlink_exit(void)
21092109

21102110
nfnetlink_subsys_unregister(&ctnl_exp_subsys);
21112111
nfnetlink_subsys_unregister(&ctnl_subsys);
2112-
return;
21132112
}
21142113

21152114
module_init(ctnetlink_init);

‎net/netfilter/nf_queue.c‎

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -279,7 +279,6 @@ void nf_reinject(struct nf_queue_entry *entry, unsigned int verdict)
279279
}
280280
rcu_read_unlock();
281281
kfree(entry);
282-
return;
283282
}
284283
EXPORT_SYMBOL(nf_reinject);
285284

‎net/netfilter/xt_time.c‎

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -148,7 +148,6 @@ static void localtime_3(struct xtm *r, time_t time)
148148
}
149149

150150
r->month = i + 1;
151-
return;
152151
}
153152

154153
static bool

0 commit comments

Comments
 (0)