{
PMMADDRESS_NODE Parent;
/* Get the right child */if (RtlRightChildAvl(Node))
{
/* Get left-most child */
Node = RtlRightChildAvl(Node);
while (RtlLeftChildAvl(Node)) Node = RtlLeftChildAvl(Node);
return Node;
}
Parent = RtlParentAvl(Node);
ASSERT(Parent != NULL);
while (Parent != Node)
{
/* The parent should be a left child, return the real predecessor */if (RtlIsLeftChildAvl(Node))
{
/* Return it */return Parent;
}
/* Keep lopping until we find our parent */
Node = Parent;
Parent = RtlParentAvl(Node);
}
/* Nothing found */returnNULL;
}
Generated on Sun May 27 2012 06:08:18 for ReactOS by
1.7.6.1
ReactOS is a registered trademark or a trademark of ReactOS Foundation in the United States and other countries.