diff mbox series

netfilter: ipt_ah: return boolean instead of integer

Message ID 20180213142557.GA9008@embeddedor.com
State Awaiting Upstream, archived
Delegated to: David Miller
Headers show
Series netfilter: ipt_ah: return boolean instead of integer | expand

Commit Message

Gustavo A. R. Silva Feb. 13, 2018, 2:25 p.m. UTC
Return statements in functions returning bool should use
true/false instead of 1/0.

This issue was detected with the help of Coccinelle.

Signed-off-by: Gustavo A. R. Silva <garsilva@embeddedor.com>
---
 net/ipv4/netfilter/ipt_ah.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Pablo Neira Ayuso March 5, 2018, 10:10 p.m. UTC | #1
On Tue, Feb 13, 2018 at 08:25:57AM -0600, Gustavo A. R. Silva wrote:
> 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.
Gustavo A. R. Silva March 5, 2018, 10:22 p.m. UTC | #2
On 03/05/2018 04:10 PM, Pablo Neira Ayuso wrote:
> On Tue, Feb 13, 2018 at 08:25:57AM -0600, Gustavo A. R. Silva wrote:
>> 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
diff mbox series

Patch

diff --git a/net/ipv4/netfilter/ipt_ah.c b/net/ipv4/netfilter/ipt_ah.c
index a787d07..7c6c20e 100644
--- a/net/ipv4/netfilter/ipt_ah.c
+++ b/net/ipv4/netfilter/ipt_ah.c
@@ -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],