Patchwork batman-adv: remove extra negation in gw_out_of_range()

login
register
mail settings
Submitter Dan Carpenter
Date Nov. 29, 2011, 6:09 a.m.
Message ID <20111129060909.GA6098@elgon.mountain>
Download mbox | patch
Permalink /patch/128219/
State Awaiting Upstream
Delegated to: David Miller
Headers show

Comments

Dan Carpenter - Nov. 29, 2011, 6:09 a.m.
There is a typo here where an extra '!' made the check to the opposite
of what was intended.

Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>

--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Marek Lindner - Nov. 29, 2011, 6:41 a.m.
On Tuesday, November 29, 2011 14:09:09 Dan Carpenter wrote:
> There is a typo here where an extra '!' made the check to the opposite
> of what was intended.
> 
> Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
> 
> diff --git a/net/batman-adv/gateway_client.c
> b/net/batman-adv/gateway_client.c index 9373a14..24403a7 100644
> --- a/net/batman-adv/gateway_client.c
> +++ b/net/batman-adv/gateway_client.c
> @@ -695,7 +695,7 @@ bool gw_out_of_range(struct bat_priv *bat_priv,
>  	}
> 
>  	neigh_old = find_router(bat_priv, orig_dst_node, NULL);
> -	if (!!neigh_old)
> +	if (!neigh_old)
>  		goto out;
> 
>  	if (curr_tq_avg - neigh_old->tq_avg > GW_THRESHOLD)


Wow - you are right! Applied in our tree.

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

Patch

diff --git a/net/batman-adv/gateway_client.c b/net/batman-adv/gateway_client.c
index 9373a14..24403a7 100644
--- a/net/batman-adv/gateway_client.c
+++ b/net/batman-adv/gateway_client.c
@@ -695,7 +695,7 @@  bool gw_out_of_range(struct bat_priv *bat_priv,
 	}
 
 	neigh_old = find_router(bat_priv, orig_dst_node, NULL);
-	if (!!neigh_old)
+	if (!neigh_old)
 		goto out;
 
 	if (curr_tq_avg - neigh_old->tq_avg > GW_THRESHOLD)