diff options
Diffstat (limited to 'src/rps/gnunet-service-rps_view.c')
-rw-r--r-- | src/rps/gnunet-service-rps_view.c | 26 |
1 files changed, 12 insertions, 14 deletions
diff --git a/src/rps/gnunet-service-rps_view.c b/src/rps/gnunet-service-rps_view.c index b7a0ba287..26a0b22bc 100644 --- a/src/rps/gnunet-service-rps_view.c +++ b/src/rps/gnunet-service-rps_view.c | |||
@@ -2,20 +2,18 @@ | |||
2 | This file is part of GNUnet. | 2 | This file is part of GNUnet. |
3 | Copyright (C) | 3 | Copyright (C) |
4 | 4 | ||
5 | GNUnet is free software; you can redistribute it and/or modify | 5 | GNUnet is free software: you can redistribute it and/or modify it |
6 | it under the terms of the GNU General Public License as published | 6 | under the terms of the GNU Affero General Public License as published |
7 | by the Free Software Foundation; either version 3, or (at your | 7 | by the Free Software Foundation, either version 3 of the License, |
8 | option) any later version. | 8 | or (at your option) any later version. |
9 | 9 | ||
10 | GNUnet is distributed in the hope that it will be useful, but | 10 | GNUnet is distributed in the hope that it will be useful, but |
11 | WITHOUT ANY WARRANTY; without even the implied warranty of | 11 | WITHOUT ANY WARRANTY; without even the implied warranty of |
12 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | 12 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
13 | General Public License for more details. | 13 | Affero General Public License for more details. |
14 | 14 | ||
15 | You should have received a copy of the GNU General Public License | 15 | You should have received a copy of the GNU Affero General Public License |
16 | along with GNUnet; see the file COPYING. If not, write to the | 16 | along with this program. If not, see <http://www.gnu.org/licenses/>. |
17 | Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, | ||
18 | Boston, MA 02110-1301, USA. | ||
19 | */ | 17 | */ |
20 | 18 | ||
21 | /** | 19 | /** |
@@ -231,11 +229,10 @@ View_get_peer_by_index (uint32_t index) | |||
231 | void | 229 | void |
232 | View_clear () | 230 | View_clear () |
233 | { | 231 | { |
234 | uint32_t i; | 232 | for (uint32_t i = 0; 0 < View_size (); i++) |
235 | uint32_t *index; | ||
236 | |||
237 | for (i = 0; 0 < View_size (); i++) | ||
238 | { /* Need to free indices stored at peers */ | 233 | { /* Need to free indices stored at peers */ |
234 | uint32_t *index; | ||
235 | |||
239 | GNUNET_assert (GNUNET_YES == | 236 | GNUNET_assert (GNUNET_YES == |
240 | GNUNET_CONTAINER_multipeermap_contains (mpm, &array[i])); | 237 | GNUNET_CONTAINER_multipeermap_contains (mpm, &array[i])); |
241 | index = GNUNET_CONTAINER_multipeermap_get (mpm, &array[i]); | 238 | index = GNUNET_CONTAINER_multipeermap_get (mpm, &array[i]); |
@@ -246,6 +243,7 @@ View_clear () | |||
246 | GNUNET_assert (0 == View_size ()); | 243 | GNUNET_assert (0 == View_size ()); |
247 | } | 244 | } |
248 | 245 | ||
246 | |||
249 | /** | 247 | /** |
250 | * Destroy peermap. | 248 | * Destroy peermap. |
251 | * | 249 | * |