public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Stephen Hemminger <shemminger@linux-foundation.org>
To: Mathieu Desnoyers <mathieu.desnoyers@polymtl.ca>
Cc: "David S. Miller" <davem@davemloft.net>,
	Robert Olsson <robert.olsson@its.uu.se>,
	Jens Laas <jens.laas@data.slu.se>,
	Hans Liss <hans.liss@its.uu.se>,
	"Paul E. McKenney" <paulmck@us.ibm.com>,
	Patrick McHardy <kaber@trash.net>,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH] fib-trie: code cleanup (v2)
Date: Tue, 8 Dec 2009 11:28:13 -0800	[thread overview]
Message-ID: <20091208112813.42ca3cca@nehalam> (raw)
In-Reply-To: <20091208192509.GD1653@Krystal>

On Tue, 8 Dec 2009 14:25:09 -0500
Mathieu Desnoyers <mathieu.desnoyers@polymtl.ca> wrote:

> * Stephen Hemminger (shemminger@linux-foundation.org) wrote:
> > On Tue, 8 Dec 2009 13:48:39 -0500
> > Mathieu Desnoyers <mathieu.desnoyers@polymtl.ca> wrote:
> > 
> > >  	/* use cache location of last found key */
> > > -	if (iter->pos > 0 && pos >= iter->pos && (l = fib_find_node(t, iter->key)))
> > > -		pos -= iter->pos;
> > > +	if (iter->pos > 0 && pos >= iter->pos)
> > > +		l = fib_find_node(t, iter->key);
> > > +		if (l)
> > > +			pos -= iter->pos;
> > >  	else {
> > 
> > Missing bracket's here change the semantics.  
> 
> Ouch, yes. thanks.
> 
> 

The original code works and was clean enough, to split the assignment
out would require duplicate code.

-- 

  reply	other threads:[~2009-12-08 19:28 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-12-08 18:48 [PATCH] fib-trie: code cleanup Mathieu Desnoyers
2009-12-08 19:05 ` Stephen Hemminger
2009-12-08 19:17   ` Mathieu Desnoyers
2009-12-08 19:06 ` Stephen Hemminger
2009-12-08 19:20   ` Mathieu Desnoyers
2009-12-08 19:29     ` Stephen Hemminger
2009-12-08 19:09 ` Stephen Hemminger
2009-12-08 19:25   ` [PATCH] fib-trie: code cleanup (v2) Mathieu Desnoyers
2009-12-08 19:28     ` Stephen Hemminger [this message]
2009-12-08 19:32       ` Mathieu Desnoyers
  -- strict thread matches above, loose matches on Subject: below --
2009-12-08 19:36 Mathieu Desnoyers
2009-12-08 20:53 ` 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=20091208112813.42ca3cca@nehalam \
    --to=shemminger@linux-foundation.org \
    --cc=davem@davemloft.net \
    --cc=hans.liss@its.uu.se \
    --cc=jens.laas@data.slu.se \
    --cc=kaber@trash.net \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mathieu.desnoyers@polymtl.ca \
    --cc=paulmck@us.ibm.com \
    --cc=robert.olsson@its.uu.se \
    /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