projects
/
oweals
/
gnunet.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
0acc583
)
fix
author
Christian Grothoff
<christian@grothoff.org>
Wed, 23 Dec 2009 20:13:52 +0000
(20:13 +0000)
committer
Christian Grothoff
<christian@grothoff.org>
Wed, 23 Dec 2009 20:13:52 +0000
(20:13 +0000)
src/util/container_heap.c
patch
|
blob
|
history
diff --git
a/src/util/container_heap.c
b/src/util/container_heap.c
index dbb391ac4e5e949feaf802af40993be7c9195f47..1bb7d579007f5573737cb46a40cf92da8a30e68a 100644
(file)
--- a/
src/util/container_heap.c
+++ b/
src/util/container_heap.c
@@
-278,7
+278,9
@@
insert_node (struct GNUNET_CONTAINER_Heap *heap,
struct GNUNET_CONTAINER_HeapNode *parent;
GNUNET_assert (node->parent == NULL);
- while ( (pos->cost < node->cost) ^ (heap->order == GNUNET_CONTAINER_HEAP_ORDER_MAX) )
+ while ( (heap->order == GNUNET_CONTAINER_HEAP_ORDER_MAX)
+ ? (pos->cost >= node->cost)
+ : (pos->cost <= node->cost) )
{
/* node is descendent of pos */
pos->tree_size += (1 + node->tree_size);