[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <542E9505.8010805@cogentembedded.com>
Date: Fri, 03 Oct 2014 16:22:29 +0400
From: Sergei Shtylyov <sergei.shtylyov@...entembedded.com>
To: Ignacy Gawędzki
<ignacy.gawedzki@...en-communications.fr>, netdev@...r.kernel.org
Subject: Re: [PATCH net] ematch: Fix the matching of inverted containers (again).
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@...en-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
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists