Searched refs:rootp (Results 1 - 3 of 3) sorted by relevance

/bionic/libc/upstream-netbsd/libc/stdlib/
H A Dtfind.c29 node_t * const *rootp = (node_t * const*)vrootp; local
34 if (rootp == NULL)
37 while (*rootp != NULL) { /* T1: */
40 if ((r = (*compar)(vkey, (*rootp)->key)) == 0) /* T2: */
41 return *rootp; /* key found */
42 rootp = (r < 0) ?
43 &(*rootp)->llink : /* T3: follow left branch */
44 &(*rootp)->rlink; /* T4: follow right branch */
H A Dtdelete.c30 node_t **rootp = (node_t **)vrootp; local
37 if (rootp == NULL || (p = *rootp) == NULL)
40 while ((cmp = (*compar)(vkey, (*rootp)->key)) != 0) {
41 p = *rootp;
42 rootp = (cmp < 0) ?
43 &(*rootp)->llink : /* follow llink branch */
44 &(*rootp)->rlink; /* follow rlink branch */
45 if (*rootp == NULL)
48 r = (*rootp)
[all...]
H A Dtsearch.c30 node_t **rootp = (node_t **)vrootp; local
35 if (rootp == NULL)
38 while (*rootp != NULL) { /* Knuth's T1: */
41 if ((r = (*compar)(vkey, (*rootp)->key)) == 0) /* T2: */
42 return *rootp; /* we found it! */
44 rootp = (r < 0) ?
45 &(*rootp)->llink : /* T3: follow left branch */
46 &(*rootp)->rlink; /* T4: follow right branch */
51 *rootp = q; /* link new node to old */

Completed in 161 milliseconds