]> wimlib.net Git - wimlib/blobdiff - src/avl_tree.c
avl_tree: Fix comments
[wimlib] / src / avl_tree.c
index ab269d0e72d0c98c93f2f50d83b0dd6b83f0f62c..eafbb80fcebb29e5078076a790d834cd4d566ecd 100644 (file)
@@ -293,7 +293,6 @@ avl_handle_subtree_growth(struct avl_tree_node * const node,
                 *      balance(A) = -2
                 *      balance(B) = +1
                 * Let x = height(C).  Then:
-                *      height(A)
                 *      height(B) = x + 2
                 *      height(E) = x + 1
                 *      height(D) = x
@@ -455,11 +454,12 @@ avl_tree_swap_with_successor(struct avl_tree_node * const X)
        avl_set_balance_factor(X, Y_balance_factor);
 }
 
-/* Removes the specified @node from the AVL tree whose root is pointed to by
- * @root_ptr.
+/* Removes the specified @node from the AVL tree.  @root_ptr must point to the
+ * pointer to the root node of the tree; *root_ptr may change if the tree is
+ * rebalanced.
  *
- * This *only* unlinks the node and rebalances the tree; it does not free any
- * memory or anything.  */
+ * This *only* removes the node and rebalances the tree; it does not free
+ * memory, nor does it do the equivalent of avl_tree_node_set_unlinked().  */
 void
 avl_tree_remove(struct avl_tree_node **root_ptr, struct avl_tree_node *node)
 {