- fix error check
[oweals/gnunet.git] / src / mesh / mesh_tunnel_tree.c
index 445b7100d171b2cb2fa95206f2338e9670dd464e..a754d9c42c81027543d2ffafa8434333b1ee9655 100644 (file)
@@ -837,7 +837,7 @@ tree_add_path (struct MeshTunnelTree *t, const struct MeshPeerPath *p,
     GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "tree:   Adding peer %s.\n",
                 GNUNET_i2s (&id));
     GNUNET_PEER_resolve (parent->peer, &id);
-    GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "tree:     to %s.\n",
+    GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "tree:            to %s.\n",
                 GNUNET_i2s (&id));
 #endif
 
@@ -860,11 +860,11 @@ tree_add_path (struct MeshTunnelTree *t, const struct MeshPeerPath *p,
 #endif
       n = tree_node_new (parent, p->peers[i]);
       n->status = MESH_PEER_RELAY;
-      if (n->peer == 1)
-      {
-        t->me = n;
-        me = i;
-      }
+    }
+    if (n->peer == 1)
+    {
+      t->me = n;
+      me = i;
     }
     i++;
     parent = n;
@@ -1050,7 +1050,7 @@ tree_debug (struct MeshTunnelTree *t)
  * @return GNUNET_YES if we should continue to iterate, GNUNET_NO if not.
  */
 static int
-iterate_free (void *cls, const GNUNET_HashCode * key, void *value)
+iterate_free (void *cls, const struct GNUNET_HashCode * key, void *value)
 {
   GNUNET_free (value);
   return GNUNET_YES;