| 289 | } |
| 290 | |
| 291 | void *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 | |
| 309 | static void clear(struct intmap n) |
| 310 | { |
no test coverage detected