#else
# include <roken.h>
#endif
+#include <afs/opr.h>
#include "rbtree.h"
* to the replacement as appropriate.
*/
-static inline void
+static_inline void
update_parent_ptr(struct opr_rbtree *head, struct opr_rbtree_node *old,
struct opr_rbtree_node *replacement)
{
return parent;
}
-static inline void
-initnode(struct opr_rbtree_node *node)
-{
- node->left = node->right = node->parent = NULL;
- node->red = 1;
-}
-
-static inline void
+static_inline void
rotateright(struct opr_rbtree *head, struct opr_rbtree_node *node)
{
struct opr_rbtree_node *left = node->left;
node->parent = left;
}
-static inline void
+static_inline void
rotateleft(struct opr_rbtree *head, struct opr_rbtree_node *node)
{
struct opr_rbtree_node *right = node->right;
node->parent = right;
}
-static inline void
+static_inline void
swapnode(struct opr_rbtree_node **a, struct opr_rbtree_node **b)
{
struct opr_rbtree_node *tmp;
if (node->left == NULL)
child = node->right;
- else if (node->right == NULL)
+ else {
+ opr_Assert(node->right == NULL);
child = node->left;
+ }
child->parent = node->parent;