gnunet-svn
[Top][All Lists]
Advanced

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

[GNUnet-SVN] r9686 - GNUnet/src/util/containers


From: gnunet
Subject: [GNUnet-SVN] r9686 - GNUnet/src/util/containers
Date: Thu, 3 Dec 2009 00:22:08 +0100

Author: nevans
Date: 2009-12-03 00:22:08 +0100 (Thu, 03 Dec 2009)
New Revision: 9686

Modified:
   GNUnet/src/util/containers/heap.c
Log:
perhaps a cleaner fix

Modified: GNUnet/src/util/containers/heap.c
===================================================================
--- GNUnet/src/util/containers/heap.c   2009-12-02 22:18:00 UTC (rev 9685)
+++ GNUnet/src/util/containers/heap.c   2009-12-02 23:22:08 UTC (rev 9686)
@@ -333,7 +333,7 @@
 
   ret = del_node->element;
   last = getPos (root, root->size);
-
+  root->size = root->size - 1;
   old_cost = del_node->cost;
   del_node->element = last->element;
   del_node->cost = last->cost;
@@ -355,8 +355,8 @@
     }
 
   GNUNET_free (last);
-  root->size--;
 
+
   if (del_node->cost > old_cost)
     {
       if (root->type == GNUNET_MAX_HEAP)





reply via email to

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