Print this page
4745 fix AVL code misspellings

@@ -35,19 +35,19 @@
  *
  * This relaxation from a perfectly balanced binary tree allows doing
  * insertion and deletion relatively efficiently. Searching the tree is
  * still a fast operation, roughly O(log(N)).
  *
- * The key to insertion and deletion is a set of tree maniuplations called
+ * The key to insertion and deletion is a set of tree manipulations called
  * rotations, which bring unbalanced subtrees back into the semi-balanced state.
  *
  * This implementation of AVL trees has the following peculiarities:
  *
  *      - The AVL specific data structures are physically embedded as fields
  *        in the "using" data structures.  To maintain generality the code
  *        must constantly translate between "avl_node_t *" and containing
- *        data structure "void *"s by adding/subracting the avl_offset.
+ *        data structure "void *"s by adding/subtracting the avl_offset.
  *
  *      - Since the AVL data is always embedded in other structures, there is
  *        no locking or memory allocation in the AVL routines. This must be
  *        provided for by the enclosing data structure's semantics. Typically,
  *        avl_insert()/_add()/_remove()/avl_insert_here() require some kind of

@@ -92,11 +92,11 @@
 #include <sys/debug.h>
 #include <sys/avl.h>
 #include <sys/cmn_err.h>
 
 /*
- * Small arrays to translate between balance (or diff) values and child indeces.
+ * Small arrays to translate between balance (or diff) values and child indices.
  *
  * Code that deals with binary tree data structures will randomly use
  * left and right children when examining a tree.  C "if()" statements
  * which evaluate randomly suffer from very poor hardware branch prediction.
  * In this code we avoid some of the branch mispredictions by using the

@@ -112,11 +112,12 @@
  * Walk from one node to the previous valued node (ie. an infix walk
  * towards the left). At any given node we do one of 2 things:
  *
  * - If there is a left child, go to it, then to it's rightmost descendant.
  *
- * - otherwise we return thru parent nodes until we've come from a right child.
+ * - otherwise we return through parent nodes until we've come from a right
+ *   child.
  *
  * Return Value:
  * NULL - if at the end of the nodes
  * otherwise next node
  */

@@ -917,11 +918,11 @@
 
 #define CHILDBIT        (1L)
 
 /*
  * Post-order tree walk used to visit all tree nodes and destroy the tree
- * in post order. This is used for destroying a tree w/o paying any cost
+ * in post order. This is used for destroying a tree without paying any cost
  * for rebalancing it.
  *
  * example:
  *
  *      void *cookie = NULL;