Index: Library/BaseOrderedCollectionRedBlackTreeLib/BaseOrderedCollectionRedBlackTreeLib.c
===================================================================
--- Library/BaseOrderedCollectionRedBlackTreeLib/BaseOrderedCollectionRedBlackTreeLib.c	(revision 15815)
+++ Library/BaseOrderedCollectionRedBlackTreeLib/BaseOrderedCollectionRedBlackTreeLib.c	(working copy)
@@ -75,12 +75,17 @@
   return Node->UserStruct;
 }
 
+/**
+  A slow function that asserts that the tree is a valid red-black tree, and
+  that it orders user structures correctly.
 
-//
-// Forward declaration of internal, unit test helper function. See
-// specification and function definition later.
-//
-STATIC
+  Read-only operation.
+
+  This function uses the stack for recursion and is not recommended for
+  "production use".
+
+  @param[in] Tree  The tree to validate.
+**/
 VOID
 RedBlackTreeValidate (
   IN CONST RED_BLACK_TREE *Tree
@@ -417,14 +422,15 @@
                           the root of the tree), then the function stores the
                           new root node of the tree in NewRoot.
 **/
-STATIC
 VOID
 RedBlackTreeRotateRight (
   IN OUT RED_BLACK_TREE_NODE *Pivot,
   OUT    RED_BLACK_TREE_NODE **NewRoot
   )
 {
-  RED_BLACK_TREE_NODE *Parent, *LeftChild, *LeftRightChild;
+  RED_BLACK_TREE_NODE *Parent;
+  RED_BLACK_TREE_NODE *LeftChild;
+  RED_BLACK_TREE_NODE *LeftRightChild;
 
   Parent         = Pivot->Parent;
   LeftChild      = Pivot->Left;
@@ -481,14 +487,15 @@
                           the root of the tree), then the function stores the
                           new root node of the tree in NewRoot.
 **/
-STATIC
 VOID
 RedBlackTreeRotateLeft (
   IN OUT RED_BLACK_TREE_NODE *Pivot,
   OUT    RED_BLACK_TREE_NODE **NewRoot
   )
 {
-  RED_BLACK_TREE_NODE *Parent, *RightChild, *RightLeftChild;
+  RED_BLACK_TREE_NODE *Parent;
+  RED_BLACK_TREE_NODE *RightChild;
+  RED_BLACK_TREE_NODE *RightLeftChild;
 
   Parent         = Pivot->Parent;
   RightChild     = Pivot->Right;
@@ -582,7 +589,8 @@
   IN     VOID                *UserStruct
   )
 {
-  RED_BLACK_TREE_NODE *Tmp, *Parent;
+  RED_BLACK_TREE_NODE *Tmp;
+  RED_BLACK_TREE_NODE *Parent;
   INTN                Result;
   RETURN_STATUS       Status;
   RED_BLACK_TREE_NODE *NewRoot;
@@ -671,7 +679,8 @@
 
   NewRoot = Tree->Root;
   while (Tmp != NewRoot && Parent->Color == RedBlackTreeRed) {
-    RED_BLACK_TREE_NODE *GrandParent, *Uncle;
+    RED_BLACK_TREE_NODE *GrandParent;
+    RED_BLACK_TREE_NODE *Uncle;
 
     //
     // Tmp is not the root node. Tmp is red. Tmp's parent is red. (Breaking
@@ -831,8 +840,6 @@
 
   @return  If Node is NULL or colored black.
 **/
-
-STATIC
 BOOLEAN
 NodeIsNullOrBlack (
   IN CONST RED_BLACK_TREE_NODE *Node
@@ -916,8 +923,11 @@
   )
 {
   RED_BLACK_TREE_NODE  *NewRoot;
-  RED_BLACK_TREE_NODE  *OrigLeftChild, *OrigRightChild, *OrigParent;
-  RED_BLACK_TREE_NODE  *Child, *Parent;
+  RED_BLACK_TREE_NODE  *OrigLeftChild;
+  RED_BLACK_TREE_NODE  *OrigRightChild;
+  RED_BLACK_TREE_NODE  *OrigParent;
+  RED_BLACK_TREE_NODE  *Child;
+  RED_BLACK_TREE_NODE  *Parent;
   RED_BLACK_TREE_COLOR ColorOfUnlinked;
 
   NewRoot        = Tree->Root;
@@ -1024,7 +1034,7 @@
       //                                 C <--- ToRelink
       //
       Parent->Left = Child;
-      if (Child) {
+      if (Child != NULL) {
         Child->Parent = Parent;
       }
 
@@ -1124,7 +1134,9 @@
     // Rotations in the loop preserve property #4.
     //
     while (Child != NewRoot && NodeIsNullOrBlack (Child)) {
-      RED_BLACK_TREE_NODE *Sibling, *LeftNephew, *RightNephew;
+      RED_BLACK_TREE_NODE *Sibling;
+      RED_BLACK_TREE_NODE *LeftNephew;
+      RED_BLACK_TREE_NODE *RightNephew;
 
       if (Child == Parent->Left) {
         Sibling = Parent->Right;
@@ -1337,13 +1349,13 @@
 
   @retval  The black-height of Node's parent.
 **/
-STATIC
 UINT32
 RedBlackTreeRecursiveCheck (
   IN CONST RED_BLACK_TREE_NODE *Node
   )
 {
-  UINT32 LeftHeight, RightHeight;
+  UINT32 LeftHeight;
+  UINT32 RightHeight;
 
   //
   // property #2
@@ -1387,15 +1399,16 @@
 
   @param[in] Tree  The tree to validate.
 **/
-STATIC
 VOID
 RedBlackTreeValidate (
   IN CONST RED_BLACK_TREE *Tree
   )
 {
   UINT32                    BlackHeight;
-  UINT32                    ForwardCount, BackwardCount;
-  CONST RED_BLACK_TREE_NODE *Last, *Node;
+  UINT32                    ForwardCount;
+  UINT32                    BackwardCount;
+  CONST RED_BLACK_TREE_NODE *Last;
+  CONST RED_BLACK_TREE_NODE *Node;
 
   DEBUG ((DEBUG_VERBOSE, "%a: Tree=%p\n", __FUNCTION__, Tree));
 
