[obvious] Fix some comments in splay-tree.c

Josef Zlomek zlomj9am@artax.karlin.mff.cuni.cz
Wed May 7 17:35:00 GMT 2003


Hi,

this patch fixes 2 comments in splay-tree.c
I'm going to commit it as obvoius.

Josef

2003-05-07  Josef Zlomek  <zlomekj@suse.cz>

	* splay-tree.c (splay_tree_predecessor): Fix comment.
	(splay_tree_successor): Fix comment.

Index: splay-tree.c
===================================================================
RCS file: /cvs/gcc/gcc/libiberty/splay-tree.c,v
retrieving revision 1.22
diff -c -3 -p -r1.22 splay-tree.c
*** splay-tree.c	20 Sep 2002 02:40:51 -0000	1.22
--- splay-tree.c	7 May 2003 17:28:58 -0000
*************** splay_tree_predecessor (sp, key)
*** 472,478 ****
    if (comparison < 0)
      return sp->root;
  
!   /* Otherwise, find the leftmost element of the right subtree.  */
    node = sp->root->left;
    if (node)
      while (node->right)
--- 472,478 ----
    if (comparison < 0)
      return sp->root;
  
!   /* Otherwise, find the rightmost element of the left subtree.  */
    node = sp->root->left;
    if (node)
      while (node->right)
*************** splay_tree_successor (sp, key)
*** 505,511 ****
    if (comparison > 0)
      return sp->root;
  
!   /* Otherwise, find the rightmost element of the left subtree.  */
    node = sp->root->right;
    if (node)
      while (node->left)
--- 505,511 ----
    if (comparison > 0)
      return sp->root;
  
!   /* Otherwise, find the leftmost element of the right subtree.  */
    node = sp->root->right;
    if (node)
      while (node->left)



More information about the Gcc-patches mailing list