Skip to contentSkip to conversation

netfilter: ipt_ah: return boolean instead of integer

PATCH In review Gustavo A. R. Silva 2 participants 3 messages Feb 13, 2018 – Mar 5, 2018

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 netfilter: ipt_ah: return boolean instead of integer

Return statements in functions returning bool should use true/false instead of 1/0.

This issue was detected with the help of Coccinelle.

---
 net/ipv4/netfilter/ipt_ah.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
net/ipv4/netfilter/ipt_ah.c +1 -1
index a787d07..7c6c20e 100644
@@ -47,7 +47,7 @@ static bool ah_mt(const struct sk_buff *skb, struct xt_action_param *par)
 		 */
 		pr_debug("Dropping evil AH tinygram.\n");
 		par->hotdrop = true;
-		return 0;
+		return false;
 	}
 
 	return spi_match(ahinfo->spis[0], ahinfo->spis[1],
Signature · 1 line
2.7.4
#1 lore raw
Quoted 4 lines · Gustavo A. R. Silva

Return statements in functions returning bool should use true/false instead of 1/0.

This issue was detected with the help of Coccinelle.

This one didn't get in time for the previous merge window.

Now applied, thanks.

#2 lore raw
Quoted 8 lines · Pablo Neira Ayuso
Quoted 4 lines · Gustavo A. R. Silva

Return statements in functions returning bool should use true/false instead of 1/0.

This issue was detected with the help of Coccinelle.

This one didn't get in time for the previous merge window.

Now applied, thanks.

Great.
Thanks, Pablo.
--
Gustavo