rculfhash: set next to NULL when node is NULL
authorMathieu Desnoyers <mathieu.desnoyers@efficios.com>
Wed, 21 Sep 2011 17:59:09 +0000 (13:59 -0400)
committerMathieu Desnoyers <mathieu.desnoyers@efficios.com>
Wed, 21 Sep 2011 17:59:09 +0000 (13:59 -0400)
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
rculfhash.c

index cd25d336aea3ef781456c046699ef86e2de81b92..8ed9c10b2386c710c2791ed8db3565d4ea13bce5 100644 (file)
@@ -1280,11 +1280,11 @@ void cds_lfht_lookup(struct cds_lfht *ht, void *key, size_t key_len,
        node = clear_flag(node);
        for (;;) {
                if (unlikely(is_end(node))) {
-                       node = NULL;
+                       node = next = NULL;
                        break;
                }
                if (unlikely(node->p.reverse_hash > reverse_hash)) {
-                       node = NULL;
+                       node = next = NULL;
                        break;
                }
                next = rcu_dereference(node->p.next);
@@ -1316,11 +1316,11 @@ void cds_lfht_next(struct cds_lfht *ht, struct cds_lfht_iter *iter)
 
        for (;;) {
                if (unlikely(is_end(node))) {
-                       node = NULL;
+                       node = next = NULL;
                        break;
                }
                if (unlikely(node->p.reverse_hash > reverse_hash)) {
-                       node = NULL;
+                       node = next = NULL;
                        break;
                }
                next = rcu_dereference(node->p.next);
This page took 0.02783 seconds and 4 git commands to generate.