MCPcopy Create free account
hub / github.com/ElementsProject/lightning / intmap_first_

Function intmap_first_

ccan/ccan/intmap/intmap.c:159–175  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

157}
158
159void *intmap_first_(const struct intmap *map, intmap_index_t *indexp)
160{
161 const struct intmap *n;
162
163 if (intmap_empty_(map)) {
164 errno = ENOENT;
165 return NULL;
166 }
167
168 n = map;
169 /* Anything with NULL value is a node. */
170 while (!n->v)
171 n = &n->u.n->child[0];
172 errno = 0;
173 *indexp = n->u.i;
174 return n->v;
175}
176
177void *intmap_after_(const struct intmap *map, intmap_index_t *indexp)
178{

Callers 3

sintmap_first_Function · 0.85
intmap_after_Function · 0.85
memleak_scan_intmap_Function · 0.85

Calls 1

intmap_empty_Function · 0.85

Tested by

no test coverage detected