Re: [PATCH] netfilter: add __rcu annotations

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Le lundi 15 novembre 2010 Ã 18:26 +0100, Patrick McHardy a Ãcrit :
> On 15.11.2010 18:21, Eric Dumazet wrote:
> > Use helpers to reduce number of sparse warnings
> > (CONFIG_SPARSE_RCU_POINTER=y)
> > 
> > remove one variable in amanda, hiding a previous one.
> 
> nf_ct_expect_related() returns negative errno codes. It still
> works, but I prefer the clarity of actually using a signed
> variable for this. Unless you have strong feelings about this,
> I'll remove that part from the patch.

No problem, maybe rename the 2nd variable to avoid a sparse warning ?

net/ipv4/netfilter/nf_nat_amanda.c:47:7: warning: symbol 'ret' shadows
an earlier one
net/ipv4/netfilter/nf_nat_amanda.c:35:15: originally declared here

[PATCH] netfilter/amanda: rename a variable

Avoid a sparse warning about 'ret' variable shadowing

Signed-off-by: Eric Dumazet <eric.dumazet@xxxxxxxxx>
---
 net/ipv4/netfilter/nf_nat_amanda.c |    8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/net/ipv4/netfilter/nf_nat_amanda.c b/net/ipv4/netfilter/nf_nat_amanda.c
index 0f23b3f..703f366 100644
--- a/net/ipv4/netfilter/nf_nat_amanda.c
+++ b/net/ipv4/netfilter/nf_nat_amanda.c
@@ -44,13 +44,13 @@ static unsigned int help(struct sk_buff *skb,
 
 	/* Try to get same port: if not, try to change it. */
 	for (port = ntohs(exp->saved_proto.tcp.port); port != 0; port++) {
-		int ret;
+		int res;
 
 		exp->tuple.dst.u.tcp.port = htons(port);
-		ret = nf_ct_expect_related(exp);
-		if (ret == 0)
+		res = nf_ct_expect_related(exp);
+		if (res == 0)
 			break;
-		else if (ret != -EBUSY) {
+		else if (res != -EBUSY) {
 			port = 0;
 			break;
 		}


--
To unsubscribe from this list: send the line "unsubscribe netfilter-devel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Netfitler Users]     [LARTC]     [Bugtraq]     [Yosemite Forum]

  Powered by Linux