LKML Archive on lore.kernel.org
help / color / mirror / Atom feed
From: Pablo Neira Ayuso <pablo@netfilter.org>
To: Jozsef Kadlecsik <kadlec@blackhole.kfki.hu>
Cc: kbuild-all@01.org, kbuild test robot <fengguang.wu@intel.com>,
	Patrick McHardy <kaber@trash.net>,
	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
Date: Wed, 11 Feb 2015 15:40:16 +0100	[thread overview]
Message-ID: <20150211144016.GB3919@salvia> (raw)
In-Reply-To: <20150211123305.GA32347@waimea>

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 <kadlec@blackhole.kfki.hu>
> Signed-off-by: Fengguang Wu <fengguang.wu@intel.com>
> ---
> 
>  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);
>  }
>  

  reply	other threads:[~2015-02-11 14:37 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <201502112043.OvntWCjd%fengguang.wu@intel.com>
2015-02-11 12:33 ` kbuild test robot
2015-02-11 14:40   ` Pablo Neira Ayuso [this message]
2015-02-11 14:50     ` Jozsef Kadlecsik
2015-03-11 19:08   ` Jozsef Kadlecsik
2015-03-11 19:12     ` Pablo Neira Ayuso
2015-03-11 19:21       ` 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=20150211144016.GB3919@salvia \
    --to=pablo@netfilter.org \
    --cc=coreteam@netfilter.org \
    --cc=fengguang.wu@intel.com \
    --cc=kaber@trash.net \
    --cc=kadlec@blackhole.kfki.hu \
    --cc=kbuild-all@01.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=netfilter-devel@vger.kernel.org \
    --subject='Re: [PATCH] netfilter: ipset: fix boolreturn.cocci warnings' \
    /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

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).