From: "Gao Feng" <gfree.wind@foxmail.com>
To: "'Pablo Neira Ayuso'" <pablo@netfilter.org>, <fgao@ikuai8.com>
Cc: <netfilter-devel@vger.kernel.org>, <gfree.wind@gmail.com>
Subject: RE: [PATCH nf-next 1/1] netfilter: Use bool type instead of int as the return value of nf_conntrack_tuple_taken and nf_nat_used_tuple
Date: Mon, 27 Mar 2017 20:50:24 +0800 [thread overview]
Message-ID: <000901d2a6f8$b402ac60$1c080520$@foxmail.com> (raw)
In-Reply-To: <20170327122443.GA25192@salvia>
> -----Original Message-----
> From: netfilter-devel-owner@vger.kernel.org
> [mailto:netfilter-devel-owner@vger.kernel.org] On Behalf Of Pablo Neira
Ayuso
> Sent: Monday, March 27, 2017 8:25 PM
> To: fgao@ikuai8.com
> Cc: netfilter-devel@vger.kernel.org; gfree.wind@gmail.com
> Subject: Re: [PATCH nf-next 1/1] netfilter: Use bool type instead of int
as the
> return value of nf_conntrack_tuple_taken and nf_nat_used_tuple
>
> On Tue, Mar 07, 2017 at 12:28:55PM +0800, fgao@ikuai8.com wrote:
> > From: Gao Feng <fgao@ikuai8.com>
> >
> > These two functions return 1/0 as true or false, so it could use bool
> > type directly instead of int.
>
> Too long patch subject.
Ok, I would make it shorter.
>
> > Signed-off-by: Gao Feng <fgao@ikuai8.com>
> > ---
> > include/net/netfilter/nf_conntrack.h | 2 +-
> > include/net/netfilter/nf_nat.h | 2 +-
> > net/netfilter/nf_conntrack_core.c | 6 +++---
> > net/netfilter/nf_nat_core.c | 2 +-
> > 4 files changed, 6 insertions(+), 6 deletions(-)
> >
> > diff --git a/include/net/netfilter/nf_conntrack.h
> > b/include/net/netfilter/nf_conntrack.h
> > index f540f9a..32a0394 100644
> > --- a/include/net/netfilter/nf_conntrack.h
> > +++ b/include/net/netfilter/nf_conntrack.h
> > @@ -160,7 +160,7 @@ void nf_conntrack_alter_reply(struct nf_conn *ct,
> >
> > /* Is this tuple taken? (ignoring any belonging to the given
> > conntrack). */
> > -int nf_conntrack_tuple_taken(const struct nf_conntrack_tuple *tuple,
> > +bool nf_conntrack_tuple_taken(const struct nf_conntrack_tuple *tuple,
> > const struct nf_conn *ignored_conntrack);
>
> Did you audit callers if they handle this type change accordingly? I don't
see
> any description about this on your patch.
I will add the caller description in the update patch.
Regards
Feng
> --
> To unsubscribe from this list: send the line "unsubscribe netfilter-devel"
in the
> body of a message to majordomo@vger.kernel.org More majordomo info at
> http://vger.kernel.org/majordomo-info.html
prev parent reply other threads:[~2017-03-27 12:50 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-03-07 4:28 [PATCH nf-next 1/1] netfilter: Use bool type instead of int as the return value of nf_conntrack_tuple_taken and nf_nat_used_tuple fgao
2017-03-27 12:24 ` Pablo Neira Ayuso
2017-03-27 12:50 ` Gao Feng [this message]
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='000901d2a6f8$b402ac60$1c080520$@foxmail.com' \
--to=gfree.wind@foxmail.com \
--cc=fgao@ikuai8.com \
--cc=gfree.wind@gmail.com \
--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).