Changeset 3f03199 in mainline for uspace/lib/c/generic/adt/hash_table.c
- Timestamp:
- 2013-09-15T06:33:53Z (12 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 9348862
- Parents:
- dd7078c (diff), 1c0cef0 (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the(diff)
links above to see all the changes relative to each parent. - File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/lib/c/generic/adt/hash_table.c
rdd7078c r3f03199 227 227 228 228 /* Check for duplicates. */ 229 list_foreach(h->bucket[idx], cur) {229 list_foreach(h->bucket[idx], link, ht_link_t, cur_link) { 230 230 /* 231 231 * We could filter out items using their hashes first, but 232 232 * calling equal() might very well be just as fast. 233 233 */ 234 ht_link_t *cur_link = member_to_inst(cur, ht_link_t, link);235 234 if (h->op->equal(cur_link, item)) 236 235 return false; … … 258 257 size_t idx = h->op->key_hash(key) % h->bucket_cnt; 259 258 260 list_foreach(h->bucket[idx], cur) { 261 ht_link_t *cur_link = member_to_inst(cur, ht_link_t, link); 259 list_foreach(h->bucket[idx], link, ht_link_t, cur_link) { 262 260 /* 263 261 * Is this is the item we are looking for? We could have first
Note:
See TracChangeset
for help on using the changeset viewer.