Signed-off-by: Timo Kokkonen <kaapeli@itanic.dy.fi>
* Quickly detach a node from a tree. Move all child nodes under
* @parent node.
*/
* Quickly detach a node from a tree. Move all child nodes under
* @parent node.
*/
for (i = 0; i < 4; i++) {
if (!node->child[i])
continue;
for (i = 0; i < 4; i++) {
if (!node->child[i])
continue;
/* Move the node into its new location */
node->pos = new_pos;
/* Move the node into its new location */
node->pos = new_pos;
/*
* Now, search the subtree for any children that are
* located in wrong place and move them into correct
/*
* Now, search the subtree for any children that are
* located in wrong place and move them into correct