From mboxrd@z Thu Jan 1 00:00:00 1970 From: Pablo Neira Ayuso Subject: Re: [PATCH] netfilter: ipset: fix boolreturn.cocci warnings Date: Wed, 11 Feb 2015 15:40:16 +0100 Message-ID: <20150211144016.GB3919@salvia> References: <201502112043.OvntWCjd%fengguang.wu@intel.com> <20150211123305.GA32347@waimea> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: kbuild-all@01.org, kbuild test robot , Patrick McHardy , netfilter-devel@vger.kernel.org, coreteam@netfilter.org, netdev@vger.kernel.org, linux-kernel@vger.kernel.org To: Jozsef Kadlecsik Return-path: Content-Disposition: inline In-Reply-To: <20150211123305.GA32347@waimea> Sender: linux-kernel-owner@vger.kernel.org List-Id: netdev.vger.kernel.org On Wed, Feb 11, 2015 at 08:33:05PM +0800, kbuild test robot wrote: > net/netfilter/xt_set.c:196:9-10: WARNING: return of 0/1 in function 'set_match_v3' with return type bool > net/netfilter/xt_set.c:242:9-10: WARNING: return of 0/1 in function 'set_match_v4' 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 Jozsef, unless you have any objection, I'm going to apply this. Thanks. > CC: Jozsef Kadlecsik > Signed-off-by: Fengguang Wu > --- > > xt_set.c | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) > > --- a/net/netfilter/xt_set.c > +++ b/net/netfilter/xt_set.c > @@ -193,7 +193,7 @@ set_match_v3(const struct sk_buff *skb, > return ret; > > if (!match_counter0(opt.ext.packets, &info->packets)) > - return 0; > + return false; > return match_counter0(opt.ext.bytes, &info->bytes); > } > > @@ -239,7 +239,7 @@ set_match_v4(const struct sk_buff *skb, > return ret; > > if (!match_counter(opt.ext.packets, &info->packets)) > - return 0; > + return false; > return match_counter(opt.ext.bytes, &info->bytes); > } >