Changeset f959a20f in mainline for uspace/lib/c/generic/adt/hash_table.c
- Timestamp:
- 2019-02-01T22:32:38Z (6 years ago)
- Children:
- 00b7fc8
- Parents:
- 1a37496
- git-author:
- Jiří Zárevúcky <zarevucky.jiri@…> (2019-02-01 21:22:39)
- git-committer:
- Jiří Zárevúcky <zarevucky.jiri@…> (2019-02-01 22:32:38)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/lib/c/generic/adt/hash_table.c
r1a37496 rf959a20f 273 273 274 274 size_t idx = h->op->hash(item) % h->bucket_cnt; 275 list_t *list = &h->bucket[idx]; 275 276 276 277 /* Traverse the circular list until we reach the starting item again. */ 277 for (link_t *cur = item->link.next; cur != &first->link; 278 cur = cur->next) { 279 assert(cur); 280 281 if (cur == &h->bucket[idx].head) 282 continue; 278 for (link_t *cur = list_next(&item->link, list); cur != &first->link; 279 cur = list_next(cur, list)) { 280 281 if (!cur) 282 cur = list_first(list); 283 283 284 284 ht_link_t *cur_link = member_to_inst(cur, ht_link_t, link);
Note:
See TracChangeset
for help on using the changeset viewer.