Changes in kernel/generic/src/adt/hash_table.c [30f1a25:a35b458] in mainline
- File:
-
- 1 edited
-
kernel/generic/src/adt/hash_table.c (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
kernel/generic/src/adt/hash_table.c
r30f1a25 ra35b458 269 269 270 270 /** Find the next item equal to item. */ 271 ht_link_t * 272 hash_table_find_next(const hash_table_t *h, ht_link_t *first, ht_link_t *item) 271 ht_link_t *hash_table_find_next(const hash_table_t *h, ht_link_t *item) 273 272 { 274 273 assert(item); 275 274 assert(h && h->bucket); 276 275 277 size_t idx = h->op->hash(item) % h->bucket_cnt;278 279 276 /* Traverse the circular list until we reach the starting item again. */ 280 for (link_t *cur = item->link.next; cur != &first->link; 281 cur = cur->next) { 277 for (link_t *cur = item->link.next; cur != &item->link; cur = cur->next) { 282 278 assert(cur); 283 284 if (cur == &h->bucket[idx].head)285 continue;286 287 279 ht_link_t *cur_link = member_to_inst(cur, ht_link_t, link); 288 280 /*
Note:
See TracChangeset
for help on using the changeset viewer.
