Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753119AbbBKO6K (ORCPT ); Wed, 11 Feb 2015 09:58:10 -0500 Received: from smtp1.kfki.hu ([148.6.0.26]:37239 "EHLO smtp1.kfki.hu" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752354AbbBKO6H (ORCPT ); Wed, 11 Feb 2015 09:58:07 -0500 X-Greylist: delayed 570 seconds by postgrey-1.27 at vger.kernel.org; Wed, 11 Feb 2015 09:58:06 EST Date: Wed, 11 Feb 2015 15:50:05 +0100 (CET) From: Jozsef Kadlecsik To: Pablo Neira Ayuso 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 Subject: Re: [PATCH] netfilter: ipset: fix boolreturn.cocci warnings In-Reply-To: <20150211144016.GB3919@salvia> Message-ID: References: <201502112043.OvntWCjd%fengguang.wu@intel.com> <20150211123305.GA32347@waimea> <20150211144016.GB3919@salvia> User-Agent: Alpine 2.10 (DEB 1266 2009-07-14) MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1953 Lines: 58 On Wed, 11 Feb 2015, Pablo Neira Ayuso wrote: > 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. No objection, just go ahead. Acked-by: Jozsef Kadlecsik Best regards, Jozsef > > 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); > > } > > > - E-mail : kadlec@blackhole.kfki.hu, kadlecsik.jozsef@wigner.mta.hu PGP key : http://www.kfki.hu/~kadlec/pgp_public_key.txt Address : Wigner Research Centre for Physics, Hungarian Academy of Sciences H-1525 Budapest 114, POB. 49, Hungary -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/