Fix issue: do not compute the good result of the benchmark.

This commit is contained in:
Patrick Pelissier committed 2017-07-20 13:40:40 +02:00
1 parent f091f6fe49
commit d3669fab53
1 file changed
+2 -2
+2 -2
View File
@@ -66,12 +66,12 @@ static int compare(gconstpointer a, gconstpointer b, gpointer user_data)
static void test_rbtree(size_t n) static void test_rbtree(size_t n)
{ {
GTree *tree = g_tree_new_full(compare, NULL, free, free); GTree *tree = g_tree_new_full(compare, NULL, free, NULL);
for (size_t i = 0; i < n; i++) { for (size_t i = 0; i < n; i++) {
// NOTE: unsigned long are not designed to work with GPOINTER_TO_INT according to documentation. // NOTE: unsigned long are not designed to work with GPOINTER_TO_INT according to documentation.
unsigned long *p = malloc(sizeof(unsigned long)); unsigned long *p = malloc(sizeof(unsigned long));
*p = rand_get(); *p = rand_get();
g_tree_insert(tree, p, NULL); g_tree_insert(tree, p, p);
} }
rand_init(); rand_init();
unsigned int s = 0; unsigned int s = 0;