[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[GNUnet-SVN] r8637 - GNUnet/src/util/containers
From: |
gnunet |
Subject: |
[GNUnet-SVN] r8637 - GNUnet/src/util/containers |
Date: |
Tue, 7 Jul 2009 16:40:35 -0600 |
Author: nevans
Date: 2009-07-07 16:40:35 -0600 (Tue, 07 Jul 2009)
New Revision: 8637
Modified:
GNUnet/src/util/containers/heap.c
GNUnet/src/util/containers/heaptest.c
Log:
heap fixes
Modified: GNUnet/src/util/containers/heap.c
===================================================================
--- GNUnet/src/util/containers/heap.c 2009-07-07 22:39:13 UTC (rev 8636)
+++ GNUnet/src/util/containers/heap.c 2009-07-07 22:40:35 UTC (rev 8637)
@@ -332,7 +332,7 @@
if (del_node == NULL)
return NULL;
else if (del_node == root->root)
- return GNUNET_CONTAINER_heap_remove_root(root);
+ return GNUNET_CONTAINER_heap_remove_root (root);
ret = del_node->element;
last = getPos (root, root->size);
@@ -412,13 +412,13 @@
ret = root_node->element;
last = getPos (root, root->size);
- if ((root_node == last) && (root->size == 1)) /* We are removing the last
node in the heap!*/
- {
- root->root = NULL;
- root->traversal_pos = NULL;
- root->size = 0;
- return ret;
- }
+ if ((root_node == last) && (root->size == 1)) /* We are removing the last
node in the heap! */
+ {
+ root->root = NULL;
+ root->traversal_pos = NULL;
+ root->size = 0;
+ return ret;
+ }
if (last->parent->left_child == last)
last->parent->left_child = NULL;
Modified: GNUnet/src/util/containers/heaptest.c
===================================================================
--- GNUnet/src/util/containers/heaptest.c 2009-07-07 22:39:13 UTC (rev
8636)
+++ GNUnet/src/util/containers/heaptest.c 2009-07-07 22:40:35 UTC (rev
8637)
@@ -105,7 +105,7 @@
GNUNET_CONTAINER_heap_iterate (myHeap, iterator_callback, NULL);
fprintf (stdout, "\n");
- GNUNET_CONTAINER_heap_destroy(myHeap);
+ GNUNET_CONTAINER_heap_destroy (myHeap);
return 0;
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [GNUnet-SVN] r8637 - GNUnet/src/util/containers,
gnunet <=