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

Function htable_prev_

ccan/ccan/htable/htable.c:207–216  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

205}
206
207void *htable_prev_(const struct htable *ht, struct htable_iter *i)
208{
209 for (;;) {
210 if (!i->off)
211 return NULL;
212 i->off--;
213 if (entry_is_valid(ht->table[i->off]))
214 return get_raw_ptr(ht, ht->table[i->off]);
215 }
216}
217
218/* Another bit currently in mask needs to be exposed, so that a bucket with p in
219 * 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