| 145 | } |
| 146 | |
| 147 | static void *htable_val(const struct htable *ht, |
| 148 | struct htable_iter *i, size_t hash, uintptr_t perfect) |
| 149 | { |
| 150 | uintptr_t h2 = get_hash_ptr_bits(ht, hash) | perfect; |
| 151 | |
| 152 | while (ht->table[i->off]) { |
| 153 | if (ht->table[i->off] != HTABLE_DELETED) { |
| 154 | if (get_extra_ptr_bits(ht, ht->table[i->off]) == h2) |
| 155 | return get_raw_ptr(ht, ht->table[i->off]); |
| 156 | } |
| 157 | i->off = (i->off + 1) & ((1 << ht->bits)-1); |
| 158 | h2 &= ~perfect; |
| 159 | } |
| 160 | return NULL; |
| 161 | } |
| 162 | |
| 163 | void *htable_firstval_(const struct htable *ht, |
| 164 | struct htable_iter *i, size_t hash) |
no test coverage detected