X-Git-Url: http://git.liburcu.org/?a=blobdiff_plain;f=rculfhash.c;h=03209623de816e6ad2a6668989706f9b362860ce;hb=897f675a4542ef8f6b88882e271e64cbb014d805;hp=638432a90b3121ef3c4b1a9d870680e1f6ba98f9;hpb=91452a6aeb429d72aafaed0fd176cac5e742251d;p=urcu.git diff --git a/rculfhash.c b/rculfhash.c index 638432a..0320962 100644 --- a/rculfhash.c +++ b/rculfhash.c @@ -1399,10 +1399,7 @@ void cds_lfht_next(struct cds_lfht *ht, struct cds_lfht_iter *iter) { struct cds_lfht_node *node, *next; - node = iter->node; - next = iter->next; - node = clear_flag(next); - + node = clear_flag(iter->next); for (;;) { if (unlikely(is_end(node))) { node = next = NULL; @@ -1429,7 +1426,7 @@ void cds_lfht_first(struct cds_lfht *ht, struct cds_lfht_iter *iter) * first node of the linked list. */ lookup = &ht->t.tbl[0]->nodes[0]; - iter->node = (struct cds_lfht_node *) lookup; + iter->next = lookup->next; cds_lfht_next(ht, iter); }