summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authordelphij <delphij@FreeBSD.org>2014-05-09 07:17:29 +0000
committerdelphij <delphij@FreeBSD.org>2014-05-09 07:17:29 +0000
commit90e164441d532281e6df118813fa9d713e1b8971 (patch)
treed69af355f0d40322c0b3d4082557d8756bed1637
parent7cb0f49ed2f136dd32fc5ce108ef3e244742098c (diff)
downloadFreeBSD-src-90e164441d532281e6df118813fa9d713e1b8971.zip
FreeBSD-src-90e164441d532281e6df118813fa9d713e1b8971.tar.gz
MFC r264836 (MFV r264830):
4745 fix AVL code misspellings
-rw-r--r--sys/cddl/contrib/opensolaris/common/avl/avl.c11
-rw-r--r--sys/cddl/contrib/opensolaris/uts/common/sys/avl.h4
2 files changed, 8 insertions, 7 deletions
diff --git a/sys/cddl/contrib/opensolaris/common/avl/avl.c b/sys/cddl/contrib/opensolaris/common/avl/avl.c
index 6106ef1..7f54c33 100644
--- a/sys/cddl/contrib/opensolaris/common/avl/avl.c
+++ b/sys/cddl/contrib/opensolaris/common/avl/avl.c
@@ -37,7 +37,7 @@
* 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:
@@ -45,7 +45,7 @@
* - 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
@@ -94,7 +94,7 @@
#include <sys/avl.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
@@ -114,7 +114,8 @@ static const int avl_balance2child[] = {0, 0, 1};
*
* - 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
@@ -919,7 +920,7 @@ avl_is_empty(avl_tree_t *tree)
/*
* 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:
diff --git a/sys/cddl/contrib/opensolaris/uts/common/sys/avl.h b/sys/cddl/contrib/opensolaris/uts/common/sys/avl.h
index ba305c9..eea9c55 100644
--- a/sys/cddl/contrib/opensolaris/uts/common/sys/avl.h
+++ b/sys/cddl/contrib/opensolaris/uts/common/sys/avl.h
@@ -39,7 +39,7 @@ extern "C" {
#include <sys/avl_impl.h>
/*
- * This is a generic implemenatation of AVL trees for use in the Solaris kernel.
+ * This is a generic implementation of AVL trees for use in the Solaris kernel.
* The interfaces provide an efficient way of implementing an ordered set of
* data structures.
*
@@ -175,7 +175,7 @@ extern void avl_insert(avl_tree_t *tree, void *node, avl_index_t where);
* Insert "new_data" in "tree" in the given "direction" either after
* or before the data "here".
*
- * This might be usefull for avl clients caching recently accessed
+ * This might be useful for avl clients caching recently accessed
* data to avoid doing avl_find() again for insertion.
*
* new_data - new data to insert
OpenPOWER on IntegriCloud