Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753062AbbBKOhG (ORCPT ); Wed, 11 Feb 2015 09:37:06 -0500 Received: from mail.us.es ([193.147.175.20]:56120 "EHLO mail.us.es" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752969AbbBKOhE (ORCPT ); Wed, 11 Feb 2015 09:37:04 -0500 X-Qmail-Scanner-Diagnostics: from 127.0.0.1 by antivirus2 (envelope-from , uid 501) with qmail-scanner-2.10 (clamdscan: 0.98.6/20056. spamassassin: 3.4.0. Clear:RC:1(127.0.0.1):SA:0(-103.2/7.5):. Processed in 1.944809 secs); 11 Feb 2015 14:36:59 -0000 X-Spam-ASN: AS198096 150.214.0.0/16 X-Envelope-From: pneira@us.es Date: Wed, 11 Feb 2015 15:40:16 +0100 From: Pablo Neira Ayuso To: Jozsef Kadlecsik 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 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 Content-Disposition: inline In-Reply-To: <20150211123305.GA32347@waimea> User-Agent: Mutt/1.5.21 (2010-09-15) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1483 Lines: 44 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); > } > -- 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/