diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/mesh/mesh_path.c | 6 | ||||
-rw-r--r-- | src/mesh/mesh_path.h | 2 |
2 files changed, 4 insertions, 4 deletions
diff --git a/src/mesh/mesh_path.c b/src/mesh/mesh_path.c index 1a3d40f9f..536fb0da6 100644 --- a/src/mesh/mesh_path.c +++ b/src/mesh/mesh_path.c | |||
@@ -76,15 +76,15 @@ path_invert (struct MeshPeerPath *path) | |||
76 | * @param path The path to duplicate. | 76 | * @param path The path to duplicate. |
77 | */ | 77 | */ |
78 | struct MeshPeerPath * | 78 | struct MeshPeerPath * |
79 | path_duplicate (struct MeshPeerPath *path) | 79 | path_duplicate (const struct MeshPeerPath *path) |
80 | { | 80 | { |
81 | struct MeshPeerPath *aux; | 81 | struct MeshPeerPath *aux; |
82 | unsigned int i; | 82 | unsigned int i; |
83 | 83 | ||
84 | aux = path_new (path->length); | 84 | aux = path_new (path->length); |
85 | memcpy (aux->peers, path->peers, path->length * sizeof (GNUNET_PEER_Id)); | 85 | memcpy (aux->peers, path->peers, path->length * sizeof (GNUNET_PEER_Id)); |
86 | for (i = 0; i < path->length; i++) | 86 | for (i = 0; i < aux->length; i++) |
87 | GNUNET_PEER_change_rc (path->peers[i], 1); | 87 | GNUNET_PEER_change_rc (aux->peers[i], 1); |
88 | return aux; | 88 | return aux; |
89 | } | 89 | } |
90 | 90 | ||
diff --git a/src/mesh/mesh_path.h b/src/mesh/mesh_path.h index 2039ceb1e..48cf048d4 100644 --- a/src/mesh/mesh_path.h +++ b/src/mesh/mesh_path.h | |||
@@ -98,7 +98,7 @@ path_invert (struct MeshPeerPath *path); | |||
98 | * @param path The path to duplicate. | 98 | * @param path The path to duplicate. |
99 | */ | 99 | */ |
100 | struct MeshPeerPath * | 100 | struct MeshPeerPath * |
101 | path_duplicate (struct MeshPeerPath *path); | 101 | path_duplicate (const struct MeshPeerPath *path); |
102 | 102 | ||
103 | 103 | ||
104 | /** | 104 | /** |