X-Git-Url: https://git.liburcu.org/?p=urcu.git;a=blobdiff_plain;f=rculfhash.c;h=8ed9c10b2386c710c2791ed8db3565d4ea13bce5;hp=359de13c82cb427a691fae8645da3adf4c5f1b08;hb=59e371e3c619d7f85698bd997ac556cea49632f3;hpb=c941bb9efd0c5b865988d46605e82c9b08c544d8 diff --git a/rculfhash.c b/rculfhash.c index 359de13..8ed9c10 100644 --- a/rculfhash.c +++ b/rculfhash.c @@ -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); @@ -1452,10 +1452,10 @@ int cds_lfht_destroy(struct cds_lfht *ht, pthread_attr_t **attr) } void cds_lfht_count_nodes(struct cds_lfht *ht, - unsigned long *approx_before, + long *approx_before, unsigned long *count, unsigned long *removed, - unsigned long *approx_after) + long *approx_after) { struct cds_lfht_node *node, *next; struct _cds_lfht_node *lookup;