Thread (1 message) 1 message, 1 author, 2011-11-29

Re: [patch] batman-adv: remove extra negation in gw_out_of_range()

From: Marek Lindner <hidden>
Date: 2011-11-29 06:41:23
Also in: batman, kernel-janitors

On Tuesday, November 29, 2011 14:09:09 Dan Carpenter wrote:
quoted hunk
There is a typo here where an extra '!' made the check to the opposite
of what was intended.

Signed-off-by: Dan Carpenter <redacted>
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
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help