aboutsummaryrefslogtreecommitdiff
path: root/src/util/container_heap.c
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2009-09-24 13:21:58 +0000
committerChristian Grothoff <christian@grothoff.org>2009-09-24 13:21:58 +0000
commit7b0de11bc686f2ba876a9d55b438a71c6586ee00 (patch)
treef6deed68a0e3c88205d756fd05b85702654dfefd /src/util/container_heap.c
parentffcf7bdcb1149189682572e5f2fe268a1bd9dda2 (diff)
downloadgnunet-7b0de11bc686f2ba876a9d55b438a71c6586ee00.tar.gz
gnunet-7b0de11bc686f2ba876a9d55b438a71c6586ee00.zip
use static'
'
Diffstat (limited to 'src/util/container_heap.c')
-rw-r--r--src/util/container_heap.c10
1 files 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)
87 return heap->root->element; 87 return heap->root->element;
88} 88}
89 89
90int 90static int
91next_power_of_2(int v) 91next_power_of_2(int v)
92{ 92{
93 v |= v >> 1; 93 v |= v >> 1;
@@ -99,7 +99,8 @@ next_power_of_2(int v)
99 return v; 99 return v;
100} 100}
101 101
102void 102#if 0
103static void
103internal_print (struct GNUNET_CONTAINER_heap_node *root) 104internal_print (struct GNUNET_CONTAINER_heap_node *root)
104{ 105{
105 fprintf (stdout, "%llu\n", (unsigned long long) root->cost); 106 fprintf (stdout, "%llu\n", (unsigned long long) root->cost);
@@ -115,11 +116,12 @@ internal_print (struct GNUNET_CONTAINER_heap_node *root)
115 } 116 }
116} 117}
117 118
118void 119static void
119printTree (struct GNUNET_CONTAINER_Heap *root) 120printTree (struct GNUNET_CONTAINER_Heap *root)
120{ 121{
121 internal_print (root->root); 122 internal_print (root->root);
122} 123}
124#endif
123 125
124struct GNUNET_CONTAINER_Heap * 126struct GNUNET_CONTAINER_Heap *
125GNUNET_CONTAINER_heap_create (enum GNUNET_CONTAINER_HeapOrder type) 127GNUNET_CONTAINER_heap_create (enum GNUNET_CONTAINER_HeapOrder type)
@@ -414,7 +416,7 @@ GNUNET_CONTAINER_heap_remove_root (struct GNUNET_CONTAINER_Heap *root)
414 /* We are removing the last node in the heap! */ 416 /* We are removing the last node in the heap! */
415 root->root = NULL; 417 root->root = NULL;
416 root->traversal_pos = NULL; 418 root->traversal_pos = NULL;
417 root->size = 0; 419 GNUNET_assert (0 == --root->size);
418 return ret; 420 return ret;
419 } 421 }
420 422