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

Function htable_prev_

ccan/ccan/htable/htable.c:195–204  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

193}
194
195void *htable_prev_(const struct htable *ht, struct htable_iter *i)
196{
197 for (;;) {
198 if (!i->off)
199 return NULL;
200 i->off--;
201 if (entry_is_valid(ht->table[i->off]))
202 return get_raw_ptr(ht, ht->table[i->off]);
203 }
204}
205
206/* Another bit currently in mask needs to be exposed, so that a bucket with p in
207 * it won't appear invalid */

Callers

nothing calls this directly

Calls 2

entry_is_validFunction · 0.85
get_raw_ptrFunction · 0.85

Tested by

no test coverage detected