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

Function intmap_last_

ccan/ccan/intmap/intmap.c:291–307  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

289}
290
291void *intmap_last_(const struct intmap *map, intmap_index_t *indexp)
292{
293 const struct intmap *n;
294
295 if (intmap_empty_(map)) {
296 errno = ENOENT;
297 return NULL;
298 }
299
300 n = map;
301 /* Anything with NULL value is a node. */
302 while (!n->v)
303 n = &n->u.n->child[1];
304 errno = 0;
305 *indexp = n->u.i;
306 return n->v;
307}
308
309static void clear(struct intmap n)
310{

Callers 2

sintmap_last_Function · 0.85
intmap_before_Function · 0.85

Calls 1

intmap_empty_Function · 0.85

Tested by

no test coverage detected