bug-hurd
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH 2/5] kern (rbtree_insert_rebalance): rewrite node swap


From: Samuel Thibault
Subject: Re: [PATCH 2/5] kern (rbtree_insert_rebalance): rewrite node swap
Date: Tue, 12 Nov 2013 12:39:40 +0100
User-agent: Mutt/1.5.21+34 (58baf7c9f32f) (2010-12-30)

Richard Braun, le Tue 12 Nov 2013 11:56:05 +0100, a écrit :
> On Sun, Nov 10, 2013 at 11:00:26PM +0100, Samuel Thibault wrote:
> > Marin Ramesa, le Sun 10 Nov 2013 22:50:21 +0100, a écrit :
> > > Value of node is never read. Simplify the node swap to one assignment
> > > and remove the temporary variable.
> > > 
> > > * kern/rbtree.c (rbtree_insert_rebalance): Simplify node swap.
> > 
> > I'd rather keep it as such, as an expression of the rbtree rotation.
> 
> It's not a rotation, merely a variable swap,

Ok, but below the comment says

/* Node is the left child of its parent. */

If node is not always updated at this point, the comment does not make
sense any more.

Samuel



reply via email to

[Prev in Thread] Current Thread [Next in Thread]