netfilter-devel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jozsef Kadlecsik <kadlec@blackhole.kfki.hu>
To: netfilter-devel@vger.kernel.org
Cc: Pablo Neira Ayuso <pablo@netfilter.org>
Subject: [PATCH 22/22] netfilter: ipset: hash: fix boolreturn.cocci warnings
Date: Thu, 10 Nov 2016 13:57:56 +0100	[thread overview]
Message-ID: <1478782676-9770-23-git-send-email-kadlec@blackhole.kfki.hu> (raw)
In-Reply-To: <1478782676-9770-1-git-send-email-kadlec@blackhole.kfki.hu>

From: kbuild test robot <fengguang.wu@intel.com>

net/netfilter/ipset/ip_set_hash_ipmac.c:70:8-9: WARNING: return of 0/1 in function 'hash_ipmac4_data_list' with return type bool
net/netfilter/ipset/ip_set_hash_ipmac.c:178:8-9: WARNING: return of 0/1 in function 'hash_ipmac6_data_list' 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

CC: Tomasz Chilinski <tomasz.chilinski@chilan.com>
Signed-off-by: Fengguang Wu <fengguang.wu@intel.com>
Signed-off-by: Jozsef Kadlecsik <kadlec@blackhole.kfki.hu>
---
 net/netfilter/ipset/ip_set_hash_ipmac.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/net/netfilter/ipset/ip_set_hash_ipmac.c b/net/netfilter/ipset/ip_set_hash_ipmac.c
index d9eb144..1ab5ed2 100644
--- a/net/netfilter/ipset/ip_set_hash_ipmac.c
+++ b/net/netfilter/ipset/ip_set_hash_ipmac.c
@@ -67,10 +67,10 @@ struct hash_ipmac4_elem {
 	if (nla_put_ipaddr4(skb, IPSET_ATTR_IP, e->ip) ||
 	    nla_put(skb, IPSET_ATTR_ETHER, ETH_ALEN, e->ether))
 		goto nla_put_failure;
-	return 0;
+	return false;
 
 nla_put_failure:
-	return 1;
+	return true;
 }
 
 static inline void
@@ -175,10 +175,10 @@ struct hash_ipmac6_elem {
 	if (nla_put_ipaddr6(skb, IPSET_ATTR_IP, &e->ip.in6) ||
 	    nla_put(skb, IPSET_ATTR_ETHER, ETH_ALEN, e->ether))
 		goto nla_put_failure;
-	return 0;
+	return false;
 
 nla_put_failure:
-	return 1;
+	return true;
 }
 
 static inline void
-- 
1.8.5.1


  parent reply	other threads:[~2016-11-10 12:58 UTC|newest]

Thread overview: 26+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-11-10 12:57 [PATCH 00/22] ipset patches for nf-next, v3 Jozsef Kadlecsik
2016-11-10 12:57 ` [PATCH 01/22] netfilter: ipset: Remove extra whitespaces in ip_set.h Jozsef Kadlecsik
2016-11-10 12:57 ` [PATCH 02/22] netfilter: ipset: Mark some helper args as const Jozsef Kadlecsik
2016-11-10 12:57 ` [PATCH 03/22] netfilter: ipset: Headers file cleanup Jozsef Kadlecsik
2016-11-10 12:57 ` [PATCH 04/22] netfilter: ipset: Improve skbinfo get/init helpers Jozsef Kadlecsik
2016-11-10 12:57 ` [PATCH 05/22] netfilter: ipset: Use kmalloc() in comment extension helper Jozsef Kadlecsik
2016-11-10 12:57 ` [PATCH 06/22] netfilter: ipset: Split extensions into separate files Jozsef Kadlecsik
2016-11-10 12:57 ` [PATCH 07/22] netfilter: ipset: Separate memsize calculation code into dedicated function Jozsef Kadlecsik
2016-11-10 12:57 ` [PATCH 08/22] netfilter: ipset: Regroup ip_set_put_extensions and add extern Jozsef Kadlecsik
2016-11-10 12:57 ` [PATCH 09/22] netfilter: ipset: Add element count to hash headers Jozsef Kadlecsik
2016-11-10 12:57 ` [PATCH 10/22] netfilter: ipset: Add element count to all set types header Jozsef Kadlecsik
2016-11-10 12:57 ` [PATCH 11/22] netfilter: ipset: Count non-static extension memory for userspace Jozsef Kadlecsik
2016-11-10 12:57 ` [PATCH 12/22] netfilter: ipset: Remove redundant mtype_expire() arguments Jozsef Kadlecsik
2016-11-10 12:57 ` [PATCH 13/22] netfilter: ipset: Simplify mtype_expire() for hash types Jozsef Kadlecsik
2016-11-10 12:57 ` [PATCH 14/22] netfilter: ipset: Make NLEN compile time constant " Jozsef Kadlecsik
2016-11-10 12:57 ` [PATCH 15/22] netfilter: ipset: Make sure element data size is a multiple of u32 Jozsef Kadlecsik
2016-11-10 12:57 ` [PATCH 16/22] netfilter: ipset: Optimize hash creation routine Jozsef Kadlecsik
2016-11-10 12:57 ` [PATCH 17/22] netfilter: ipset: Make struct htype per ipset family Jozsef Kadlecsik
2016-11-10 12:57 ` [PATCH 18/22] netfilter: ipset: Collapse same condition body to a single one Jozsef Kadlecsik
2016-11-10 12:57 ` [PATCH 19/22] netfilter: ipset: Fix reported memory size for hash:* types Jozsef Kadlecsik
2016-11-10 12:57 ` [PATCH 20/22] netfilter: ipset: hash:ipmac type support added to ipset Jozsef Kadlecsik
2016-11-10 12:57 ` [PATCH 21/22] netfilter: ipset: use setup_timer() and mod_timer() Jozsef Kadlecsik
2016-11-10 12:57 ` Jozsef Kadlecsik [this message]
2016-11-13 21:18 ` [PATCH 00/22] ipset patches for nf-next, v3 Pablo Neira Ayuso
  -- strict thread matches above, loose matches on Subject: below --
2016-10-23 20:37 [PATCH 00/22] ipset patches for nf-next, v2 Jozsef Kadlecsik
2016-10-23 20:37 ` [PATCH 22/22] netfilter: ipset: hash: fix boolreturn.cocci warnings Jozsef Kadlecsik
2016-10-17 12:51 [PATCH 00/22] ipset patches for nf-next Jozsef Kadlecsik
2016-10-17 12:51 ` [PATCH 22/22] netfilter: ipset: hash: fix boolreturn.cocci warnings Jozsef Kadlecsik

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1478782676-9770-23-git-send-email-kadlec@blackhole.kfki.hu \
    --to=kadlec@blackhole.kfki.hu \
    --cc=netfilter-devel@vger.kernel.org \
    --cc=pablo@netfilter.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).