From 7b0de11bc686f2ba876a9d55b438a71c6586ee00 Mon Sep 17 00:00:00 2001 From: Christian Grothoff Date: Thu, 24 Sep 2009 13:21:58 +0000 Subject: [PATCH] use static' ' --- src/util/container_heap.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/src/util/container_heap.c b/src/util/container_heap.c index 16918985d..8c3cb41aa 100644 --- a/src/util/container_heap.c +++ b/src/util/container_heap.c @@ -87,7 +87,7 @@ void *GNUNET_CONTAINER_heap_peek (struct GNUNET_CONTAINER_Heap *heap) return heap->root->element; } -int +static int next_power_of_2(int v) { v |= v >> 1; @@ -99,7 +99,8 @@ next_power_of_2(int v) return v; } -void +#if 0 +static void internal_print (struct GNUNET_CONTAINER_heap_node *root) { fprintf (stdout, "%llu\n", (unsigned long long) root->cost); @@ -115,11 +116,12 @@ internal_print (struct GNUNET_CONTAINER_heap_node *root) } } -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) @@ -414,7 +416,7 @@ GNUNET_CONTAINER_heap_remove_root (struct GNUNET_CONTAINER_Heap *root) /* 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; } -- 2.25.1