* [PATCH v2] net/netfilter: refactor notifier registration
@ 2012-03-09 9:35 Tony Zelenoff
2012-04-19 18:04 ` Pablo Neira Ayuso
0 siblings, 1 reply; 2+ messages in thread
From: Tony Zelenoff @ 2012-03-09 9:35 UTC (permalink / raw)
To: netfilter-devel; +Cc: antonz, pablo, eric.dumazet
* ret variable initialization removed as useless
* similar code strings concatenated and functions code
flow became more plain
Signed-off-by: Tony Zelenoff <antonz@parallels.com>
---
net/netfilter/nf_conntrack_ecache.c | 10 ++++------
1 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/net/netfilter/nf_conntrack_ecache.c b/net/netfilter/nf_conntrack_ecache.c
index 5bd3047..3a3409f 100644
--- a/net/netfilter/nf_conntrack_ecache.c
+++ b/net/netfilter/nf_conntrack_ecache.c
@@ -84,7 +84,7 @@ EXPORT_SYMBOL_GPL(nf_ct_deliver_cached_events);
int nf_conntrack_register_notifier(struct net *net,
struct nf_ct_event_notifier *new)
{
- int ret = 0;
+ int ret;
struct nf_ct_event_notifier *notify;
mutex_lock(&nf_ct_ecache_mutex);
@@ -95,8 +95,7 @@ int nf_conntrack_register_notifier(struct net *net,
goto out_unlock;
}
rcu_assign_pointer(net->ct.nf_conntrack_event_cb, new);
- mutex_unlock(&nf_ct_ecache_mutex);
- return ret;
+ ret = 0;
out_unlock:
mutex_unlock(&nf_ct_ecache_mutex);
@@ -121,7 +120,7 @@ EXPORT_SYMBOL_GPL(nf_conntrack_unregister_notifier);
int nf_ct_expect_register_notifier(struct net *net,
struct nf_exp_event_notifier *new)
{
- int ret = 0;
+ int ret;
struct nf_exp_event_notifier *notify;
mutex_lock(&nf_ct_ecache_mutex);
@@ -132,8 +131,7 @@ int nf_ct_expect_register_notifier(struct net *net,
goto out_unlock;
}
rcu_assign_pointer(net->ct.nf_expect_event_cb, new);
- mutex_unlock(&nf_ct_ecache_mutex);
- return ret;
+ ret = 0;
out_unlock:
mutex_unlock(&nf_ct_ecache_mutex);
--
1.7.1
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH v2] net/netfilter: refactor notifier registration
2012-03-09 9:35 [PATCH v2] net/netfilter: refactor notifier registration Tony Zelenoff
@ 2012-04-19 18:04 ` Pablo Neira Ayuso
0 siblings, 0 replies; 2+ messages in thread
From: Pablo Neira Ayuso @ 2012-04-19 18:04 UTC (permalink / raw)
To: Tony Zelenoff; +Cc: netfilter-devel, eric.dumazet
On Fri, Mar 09, 2012 at 01:35:39PM +0400, Tony Zelenoff wrote:
> * ret variable initialization removed as useless
> * similar code strings concatenated and functions code
> flow became more plain
>
> Signed-off-by: Tony Zelenoff <antonz@parallels.com>
It took some time, but finally applied to Netfilter's net-next tree.
Thanks.
http://1984.lsi.us.es/git/net-next/
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2012-04-19 18:04 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-03-09 9:35 [PATCH v2] net/netfilter: refactor notifier registration Tony Zelenoff
2012-04-19 18:04 ` 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).