gnunet-svn
[Top][All Lists]
Advanced

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

[GNUnet-SVN] r30116 - gnunet/src/mesh


From: gnunet
Subject: [GNUnet-SVN] r30116 - gnunet/src/mesh
Date: Thu, 10 Oct 2013 19:59:17 +0200

Author: bartpolot
Date: 2013-10-10 19:59:17 +0200 (Thu, 10 Oct 2013)
New Revision: 30116

Modified:
   gnunet/src/mesh/mesh_path.c
   gnunet/src/mesh/mesh_path.h
Log:
- use proper const qualifier


Modified: gnunet/src/mesh/mesh_path.c
===================================================================
--- gnunet/src/mesh/mesh_path.c 2013-10-10 17:23:13 UTC (rev 30115)
+++ gnunet/src/mesh/mesh_path.c 2013-10-10 17:59:17 UTC (rev 30116)
@@ -76,15 +76,15 @@
  * @param path The path to duplicate.
  */
 struct MeshPeerPath *
-path_duplicate (struct MeshPeerPath *path)
+path_duplicate (const struct MeshPeerPath *path)
 {
   struct MeshPeerPath *aux;
   unsigned int i;
 
   aux = path_new (path->length);
   memcpy (aux->peers, path->peers, path->length * sizeof (GNUNET_PEER_Id));
-  for (i = 0; i < path->length; i++)
-    GNUNET_PEER_change_rc (path->peers[i], 1);
+  for (i = 0; i < aux->length; i++)
+    GNUNET_PEER_change_rc (aux->peers[i], 1);
   return aux;
 }
 

Modified: gnunet/src/mesh/mesh_path.h
===================================================================
--- gnunet/src/mesh/mesh_path.h 2013-10-10 17:23:13 UTC (rev 30115)
+++ gnunet/src/mesh/mesh_path.h 2013-10-10 17:59:17 UTC (rev 30116)
@@ -98,7 +98,7 @@
  * @param path The path to duplicate.
  */
 struct MeshPeerPath *
-path_duplicate (struct MeshPeerPath *path);
+path_duplicate (const struct MeshPeerPath *path);
 
 
 /**




reply via email to

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