BIND 10 #397: Port generic red-black tree (RBT) data structure from BIND-9

BIND 10 Development do-not-reply at isc.org
Tue Nov 23 06:08:36 UTC 2010


#397: Port generic red-black tree (RBT) data structure from BIND-9
------------------------------+---------------------------------------------
      Reporter:  zzchen_pku   |        Owner:  jinmei   
          Type:  enhancement  |       Status:  reviewing
      Priority:  major        |    Milestone:           
     Component:  data source  |   Resolution:           
      Keywords:               |    Sensitive:  0        
Estimatedhours:  0.0          |        Hours:  0        
      Billable:  1            |   Totalhours:  0        
      Internal:  0            |  
------------------------------+---------------------------------------------

Comment(by jinmei):

 The code comment on the latter half of successor() didn't actually parse
 to me:
 {{{
     // otherwise return the parent without left child or
     // current node is not its right child
 }}}
 but if I my guess of "the parent without left child" is correct, it
 doesn't describe what the code does.  This code actually checks if
 "parent" reaches the root node.

 Also, for the same reason I pointed out in the previous review comment,
 the code "s != s->left_" is confusing.  it's far better to check if it's
 the null node explicitly.

 I've committed my proposed fix to these issues (r3618).  Please check.

-- 
Ticket URL: <http://bind10.isc.org/ticket/397#comment:19>
BIND 10 Development <http://bind10.isc.org>
BIND 10 Development


More information about the bind10-tickets mailing list