netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com>
To: "Ignacy Gawędzki" <ignacy.gawedzki@green-communications.fr>,
	netdev@vger.kernel.org
Subject: Re: [PATCH net] ematch: Fix the matching of inverted containers (again).
Date: Fri, 03 Oct 2014 16:22:29 +0400	[thread overview]
Message-ID: <542E9505.8010805@cogentembedded.com> (raw)
In-Reply-To: <20141003080600.GA13146@zenon.in.qult.net>

Hello.

On 10/3/2014 12:06 PM, Ignacy Gawędzki wrote:

> The result of a negated container has to be inverted before checking for
> early ending.

> Signed-off-by: Ignacy Gawędzki <ignacy.gawedzki@green-communications.fr>
> ---
>   net/sched/ematch.c | 9 +++++----
>   1 file changed, 5 insertions(+), 4 deletions(-)

> diff --git a/net/sched/ematch.c b/net/sched/ematch.c
> index ad57f44..300ecf6 100644
> --- a/net/sched/ematch.c
> +++ b/net/sched/ematch.c
> @@ -526,11 +526,12 @@ pop_stack:
>   		match_idx = stack[--stackp];
>   		cur_match = tcf_em_get_match(tree, match_idx);
>
> -		if (tcf_em_early_end(cur_match, res)) {
> -			if (tcf_em_is_inverted(cur_match))
> -				res = !res;
> +		if (tcf_em_is_inverted(cur_match))
> +			res = !res;
> +
> +		if (tcf_em_early_end(cur_match, res))
>   			goto pop_stack;
> -		} else {
> +		else {
>   			match_idx++;
>   			goto proceed;
>   		}

    The kernel style dictates that an *if* statement should have {} in all its 
arms, if it has {} in at least one of the arms.

WBR, Sergei

  reply	other threads:[~2014-10-03 12:22 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-10-03  8:06 [PATCH net] ematch: Fix the matching of inverted containers (again) Ignacy Gawędzki
2014-10-03 12:22 ` Sergei Shtylyov [this message]
2014-10-03 13:44   ` [PATCH net v2 0/1] " Ignacy Gawędzki
2014-10-03 13:44   ` [PATCH net v2 1/1] ematch: Fix early ending of inverted containers Ignacy Gawędzki
2014-10-05  0:50     ` David Miller

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=542E9505.8010805@cogentembedded.com \
    --to=sergei.shtylyov@cogentembedded.com \
    --cc=ignacy.gawedzki@green-communications.fr \
    --cc=netdev@vger.kernel.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).