LRN's patch argument order
[oweals/gnunet.git] / src / util / container_heap.c
index ef6bcc892ce0f5e848d993182e597d044581fa58..c34e220ce9cd4a4a16a471dceaedd7779d244b38 100644 (file)
@@ -1,17 +1,17 @@
 /*
   This file is part of GNUnet.
   (C) 2008, 2009 Christian Grothoff (and other contributing authors)
-  
+
   GNUnet is free software; you can redistribute it and/or modify
   it under the terms of the GNU General Public License as published
   by the Free Software Foundation; either version 2, or (at your
   option) any later version.
-  
+
   GNUnet is distributed in the hope that it will be useful, but
   WITHOUT ANY WARRANTY; without even the implied warranty of
   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
   General Public License for more details.
-  
+
   You should have received a copy of the GNU General Public License
   along with GNUnet; see the file COPYING.  If not, write to the
   Free Software Foundation, Inc., 59 Temple Place - Suite 330,
@@ -28,6 +28,7 @@
 #include "platform.h"
 #include "gnunet_util_lib.h"
 
+#define LOG(kind,...) GNUNET_log_from (kind, "util", __VA_ARGS__)
 
 #define DEBUG 0
 
@@ -292,11 +293,8 @@ insert_node (struct GNUNET_CONTAINER_Heap *heap,
 
   GNUNET_assert (node->parent == NULL);
   while ((heap->order == GNUNET_CONTAINER_HEAP_ORDER_MAX) ? (pos->cost >=
-                                                             node->
-                                                             cost) : (pos->
-                                                                      cost <=
-                                                                      node->
-                                                                      cost))
+                                                             node->cost)
+         : (pos->cost <= node->cost))
   {
     /* node is descendent of pos */
     pos->tree_size += (1 + node->tree_size);
@@ -484,7 +482,7 @@ remove_node (struct GNUNET_CONTAINER_HeapNode *node)
 
 /**
  * Removes a node from the heap.
- * 
+ *
  * @param node node to remove
  * @return element data stored at the node
  */