gnunet-svn
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[GNUnet-SVN] r9883 - gnunet/src/util


From: gnunet
Subject: [GNUnet-SVN] r9883 - gnunet/src/util
Date: Wed, 23 Dec 2009 21:13:52 +0100

Author: grothoff
Date: 2009-12-23 21:13:52 +0100 (Wed, 23 Dec 2009)
New Revision: 9883

Modified:
   gnunet/src/util/container_heap.c
Log:
fix

Modified: gnunet/src/util/container_heap.c
===================================================================
--- gnunet/src/util/container_heap.c    2009-12-23 20:13:47 UTC (rev 9882)
+++ gnunet/src/util/container_heap.c    2009-12-23 20:13:52 UTC (rev 9883)
@@ -278,7 +278,9 @@
   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);





reply via email to

[Prev in Thread] Current Thread [Next in Thread]