Returns now GNUNET_SYSERR
[oweals/gnunet.git] / src / util / container_heap.c
index 1bb7d579007f5573737cb46a40cf92da8a30e68a..7cd30a0a740c784a04d90fd1f172ac1b59dd2c8b 100644 (file)
@@ -267,6 +267,7 @@ GNUNET_CONTAINER_heap_walk_get_next (struct GNUNET_CONTAINER_Heap *heap)
  * Insert the given node 'node' into the subtree starting
  * at 'pos' (while keeping the tree somewhat balanced).
  *
+ * @param heap heap to modify
  * @param pos existing tree
  * @param node node to insert (which may be a subtree itself)
  */
@@ -377,8 +378,7 @@ GNUNET_CONTAINER_heap_remove_root (struct GNUNET_CONTAINER_Heap *heap)
   else if (root->right_child == NULL)
     {
       heap->root = root->left_child;
-      if (root->left_child != NULL)
-       root->left_child->parent = NULL;
+      root->left_child->parent = NULL;
     }
   else
     {