Add hash table iterator macros
[urcu.git] / tests / test_urcu_hash.c
index 87c4ad13781393a1d3aeb522f0e8c4406e52d037..554f1e914202c48ce7cc296524a1fd4fb4ef1f6c 100644 (file)
@@ -711,14 +711,12 @@ void test_delete_all_nodes(struct cds_lfht *ht)
        struct lfht_test_node *node;
        unsigned long count = 0;
 
-       cds_lfht_first(ht, &iter);
-       while ((node = cds_lfht_iter_get_test_node(&iter)) != NULL) {
+       cds_lfht_for_each_entry(ht, &iter, node, node) {
                int ret;
 
                ret = cds_lfht_del(test_ht, &iter);
                assert(!ret);
                call_rcu(&node->head, free_node_cb);
-               cds_lfht_next(ht, &iter);
                count++;
        }
        printf("deleted %lu nodes.\n", count);
This page took 0.022175 seconds and 4 git commands to generate.