return heap->root->element;
}
-int
+static int
next_power_of_2(int v)
{
v |= v >> 1;
return v;
}
-void
+#if 0
+static void
internal_print (struct GNUNET_CONTAINER_heap_node *root)
{
fprintf (stdout, "%llu\n", (unsigned long long) root->cost);
}
}
-void
+static void
printTree (struct GNUNET_CONTAINER_Heap *root)
{
internal_print (root->root);
}
+#endif
struct GNUNET_CONTAINER_Heap *
GNUNET_CONTAINER_heap_create (enum GNUNET_CONTAINER_HeapOrder type)
/* We are removing the last node in the heap! */
root->root = NULL;
root->traversal_pos = NULL;
- root->size = 0;
+ GNUNET_assert (0 == --root->size);
return ret;
}