src/avltree.c
static inline int
avltree_node_index(const struct avltree_node *node,
                   const struct avltree_node *parent)
{
    assert(parent != NULL);
    assert((node == NULL) || (avltree_node_parent(node) == parent));

    if (parent->children[AVLTREE_LEFT] == node) {
        return AVLTREE_LEFT;
    }

    assert(parent->children[AVLTREE_RIGHT] == node);

    return AVLTREE_RIGHT;
}
/*
 * Return the index of a node in the children array of its parent.
 *
 * The parent parameter must not be NULL, and must be the parent of the
 * given node.
 */
Return the index of a node in the children array of its parent.
The parent parameter must not be NULL, and must be the parent of the
given node.
Return the index of a node in the children array of its parent . The parent parameter must not be NULL and must be the parent of the given node .
static inline int
avltree_node_index(const struct avltree_node *node,
                   const struct avltree_node *parent)
{
    assert(parent != NULL);
    assert((node == NULL) || (avltree_node_parent(node) == parent));
    if (parent->children[AVLTREE_LEFT] == node) {
        return AVLTREE_LEFT;
    }
    assert(parent->children[AVLTREE_RIGHT] == node);
    return AVLTREE_RIGHT;
}
static inline int avltree_node_index ( const struct avltree_node * node , const struct avltree_node * parent ) { assert ( parent != NULL ) ; assert ( ( node == NULL ) || ( avltree_node_parent ( node ) == parent ) ) ; if ( parent -> children [ AVLTREE_LEFT ] == node ) { return AVLTREE_LEFT ; } assert ( parent -> children [ AVLTREE_RIGHT ] == node ) ; return AVLTREE_RIGHT ; }
Return the index of a node in the children array of its parent.
Return the index of a node in the children array of its parent .