picoquic/picosplay.c
picosplay_node_t* picosplay_next(picosplay_node_t *node) {
    if(node->right != NULL)
        return leftmost(node->right);
    while(node->parent != NULL && node == node->parent->right)
        node = node->parent;
    return node->parent;
}
/* Return the minimal node that is bigger than the given.
 * This is either:
 *  - leftmost child in the right subtree
 *  - closest ascendant for which given node is in left subtree
 */
Return the minimal node that is bigger than the given.
This is either:
- leftmost child in the right subtree
- closest ascendant for which given node is in left subtree
Return the minimal node that is bigger than the given . This is either : - leftmost child in the right subtree - closest ascendant for which given node is in left subtree
picosplay_node_t* picosplay_next(picosplay_node_t *node) {
    if(node->right != NULL)
        return leftmost(node->right);
    while(node->parent != NULL && node == node->parent->right)
        node = node->parent;
    return node->parent;
}
picosplay_node_t * picosplay_next ( picosplay_node_t * node ) { if ( node -> right != NULL ) return leftmost ( node -> right ) ; while ( node -> parent != NULL && node == node -> parent -> right ) node = node -> parent ; return node -> parent ; }
Return the minimal node that is bigger than the given.
Return the minimal node that is bigger than the given .