netfilter-devel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH nf-next 1/1] netfilter: expect: Make return value of nf_ct_expect_insert is void
@ 2017-02-09 13:40 fgao
  2017-02-12 13:37 ` Pablo Neira Ayuso
  0 siblings, 1 reply; 2+ messages in thread
From: fgao @ 2017-02-09 13:40 UTC (permalink / raw)
  To: pablo, netfilter-devel; +Cc: gfree.wind, Gao Feng

From: Gao Feng <fgao@ikuai8.com>

Because nf_ct_expect_insert always succeeds now, so make its return
value is void instead of int. And remove codes used to check its
return value.

Signed-off-by: Gao Feng <fgao@ikuai8.com>
---
 net/netfilter/nf_conntrack_expect.c | 8 +++-----
 1 file changed, 3 insertions(+), 5 deletions(-)

diff --git a/net/netfilter/nf_conntrack_expect.c b/net/netfilter/nf_conntrack_expect.c
index f8dbacf..e19a697 100644
--- a/net/netfilter/nf_conntrack_expect.c
+++ b/net/netfilter/nf_conntrack_expect.c
@@ -353,7 +353,7 @@ void nf_ct_expect_put(struct nf_conntrack_expect *exp)
 }
 EXPORT_SYMBOL_GPL(nf_ct_expect_put);
 
-static int nf_ct_expect_insert(struct nf_conntrack_expect *exp)
+static void nf_ct_expect_insert(struct nf_conntrack_expect *exp)
 {
 	struct nf_conn_help *master_help = nfct_help(exp->master);
 	struct nf_conntrack_helper *helper;
@@ -380,7 +380,6 @@ static int nf_ct_expect_insert(struct nf_conntrack_expect *exp)
 	add_timer(&exp->timeout);
 
 	NF_CT_STAT_INC(net, expect_create);
-	return 0;
 }
 
 /* Race with expectations being used means we could have none to find; OK. */
@@ -464,9 +463,8 @@ int nf_ct_expect_related_report(struct nf_conntrack_expect *expect,
 	if (ret <= 0)
 		goto out;
 
-	ret = nf_ct_expect_insert(expect);
-	if (ret < 0)
-		goto out;
+	nf_ct_expect_insert(expect);
+
 	spin_unlock_bh(&nf_conntrack_expect_lock);
 	nf_ct_expect_event_report(IPEXP_NEW, expect, portid, report);
 	return ret;
-- 
1.9.1



^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH nf-next 1/1] netfilter: expect: Make return value of nf_ct_expect_insert is void
  2017-02-09 13:40 [PATCH nf-next 1/1] netfilter: expect: Make return value of nf_ct_expect_insert is void fgao
@ 2017-02-12 13:37 ` Pablo Neira Ayuso
  0 siblings, 0 replies; 2+ messages in thread
From: Pablo Neira Ayuso @ 2017-02-12 13:37 UTC (permalink / raw)
  To: fgao; +Cc: netfilter-devel, gfree.wind

On Thu, Feb 09, 2017 at 09:40:38PM +0800, fgao@ikuai8.com wrote:
> From: Gao Feng <fgao@ikuai8.com>
> 
> Because nf_ct_expect_insert always succeeds now, so make its return
> value is void instead of int. And remove codes used to check its
> return value.

Also applied, thanks.

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2017-02-12 13:37 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-02-09 13:40 [PATCH nf-next 1/1] netfilter: expect: Make return value of nf_ct_expect_insert is void fgao
2017-02-12 13:37 ` Pablo Neira Ayuso

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).