rculfhash: fix get first / get next iterator
authorMathieu Desnoyers <mathieu.desnoyers@efficios.com>
Wed, 28 Sep 2011 03:27:02 +0000 (23:27 -0400)
committerMathieu Desnoyers <mathieu.desnoyers@efficios.com>
Wed, 28 Sep 2011 03:27:02 +0000 (23:27 -0400)
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
rculfhash.c

index 638432a90b3121ef3c4b1a9d870680e1f6ba98f9..03209623de816e6ad2a6668989706f9b362860ce 100644 (file)
@@ -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);
 }
 
This page took 0.025848 seconds and 4 git commands to generate.