diff mbox series

netfilter: connlimit: fix boolreturn.cocci warnings

Message ID 20171219174641.GA30912@lkp-wsm-ep1
State RFC
Delegated to: Pablo Neira
Headers show
Series netfilter: connlimit: fix boolreturn.cocci warnings | expand

Commit Message

kbuild test robot Dec. 19, 2017, 5:46 p.m. UTC
From: Fengguang Wu <fengguang.wu@intel.com>

net/netfilter/nf_conncount.c:74:9-10: WARNING: return of 0/1 in function 'already_closed' with return type bool

 Return statements in functions returning bool should use
 true/false instead of 1/0.
Generated by: scripts/coccinelle/misc/boolreturn.cocci

Fixes: 61b781a5a0bb ("netfilter: connlimit: split xt_connlimit into front and backend")
CC: Florian Westphal <fw@strlen.de>
Signed-off-by: Fengguang Wu <fengguang.wu@intel.com>
---

 nf_conncount.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

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

Patch

--- a/net/netfilter/nf_conncount.c
+++ b/net/netfilter/nf_conncount.c
@@ -71,7 +71,7 @@  static inline bool already_closed(const
 		return conn->proto.tcp.state == TCP_CONNTRACK_TIME_WAIT ||
 		       conn->proto.tcp.state == TCP_CONNTRACK_CLOSE;
 	else
-		return 0;
+		return false;
 }
 
 static int key_diff(const u32 *a, const u32 *b, unsigned int klen)