Skip to content

Commit

Permalink
netfilter: nf_conntrack: elegantly simplify nf_ct_exp_net()
Browse files Browse the repository at this point in the history
Remove #ifdef at nf_ct_exp_net() by using nf_ct_net().

Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com>
Signed-off-by: Patrick McHardy <kaber@trash.net>
  • Loading branch information
Alexey Dobriyan authored and Patrick McHardy committed Feb 12, 2010
1 parent b2907e5 commit 857b409
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions include/net/netfilter/nf_conntrack_expect.h
Original file line number Diff line number Diff line change
Expand Up @@ -56,11 +56,7 @@ struct nf_conntrack_expect {

static inline struct net *nf_ct_exp_net(struct nf_conntrack_expect *exp)
{
#ifdef CONFIG_NET_NS
return exp->master->ct_net; /* by definition */
#else
return &init_net;
#endif
return nf_ct_net(exp->master);
}

struct nf_conntrack_expect_policy {
Expand Down

0 comments on commit 857b409

Please sign in to comment.