aboutsummaryrefslogtreecommitdiff
path: root/src/rps/gnunet-service-rps_sampler.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/rps/gnunet-service-rps_sampler.c')
-rw-r--r--src/rps/gnunet-service-rps_sampler.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/src/rps/gnunet-service-rps_sampler.c b/src/rps/gnunet-service-rps_sampler.c
index 88709d465..ed3677e8c 100644
--- a/src/rps/gnunet-service-rps_sampler.c
+++ b/src/rps/gnunet-service-rps_sampler.c
@@ -600,9 +600,6 @@ static void
600sampler_empty (struct RPS_Sampler *sampler) 600sampler_empty (struct RPS_Sampler *sampler)
601{ 601{
602 sampler_resize (sampler, 0); 602 sampler_resize (sampler, 0);
603 GNUNET_array_grow (sampler->trash_can,
604 sampler->trash_can_size,
605 0);
606} 603}
607 604
608 605
@@ -923,6 +920,8 @@ RPS_sampler_get_n_rand_peers (struct RPS_Sampler *sampler,
923 void *cls, uint32_t num_peers) 920 void *cls, uint32_t num_peers)
924{ 921{
925 GNUNET_assert (0 != sampler->sampler_size); 922 GNUNET_assert (0 != sampler->sampler_size);
923 if (0 == num_peers)
924 return;
926 925
927 // TODO check if we have too much (distinct) sampled peers 926 // TODO check if we have too much (distinct) sampled peers
928 uint32_t i; 927 uint32_t i;