--- Gnu-Mach/kern/rbtree.h 2020/09/02 04:45:13 1.1.1.1 +++ Gnu-Mach/kern/rbtree.h 2020/09/02 04:54:02 1.1.1.4 @@ -31,13 +31,9 @@ #include #include -#include -#include +#include #include -#define structof(ptr, type, member) \ - ((type *)((char *)ptr - offsetof(type, member))) - /* * Indexes of the left and right nodes in the children array of a node. */ @@ -178,8 +174,8 @@ MACRO_END * This macro performs a standard lookup to obtain the insertion point of * the given node in the tree (it is assumed that the inserted node never * compares equal to any other entry in the tree) and links the node. It - * then It then checks red-black rules violations, and rebalances the tree - * if necessary. + * then checks red-black rules violations, and rebalances the tree if + * necessary. * * Unlike rbtree_lookup(), the cmp_fn parameter must compare two complete * entries, so it is suggested to use two different comparison inline @@ -305,6 +301,6 @@ void rbtree_remove(struct rbtree *tree, for (node = rbtree_postwalk_deepest(tree), \ tmp = rbtree_postwalk_unlink(node); \ node != NULL; \ - node = tmp, tmp = rbtree_postwalk_unlink(node)) \ + node = tmp, tmp = rbtree_postwalk_unlink(node)) #endif /* _KERN_RBTREE_H */