From d8718ecb695a90ae3c80b0306d74b7b43c34bd04 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Julius=20B=C3=BCnger?= Date: Wed, 22 Jul 2015 09:37:26 +0000 Subject: [PATCH] -cleaned resizing of sampler --- src/rps/gnunet-service-rps.c | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) diff --git a/src/rps/gnunet-service-rps.c b/src/rps/gnunet-service-rps.c index fd398b863..3b585e9f7 100644 --- a/src/rps/gnunet-service-rps.c +++ b/src/rps/gnunet-service-rps.c @@ -1039,20 +1039,15 @@ static void client_resize_wrapper () { uint32_t bigger_size; - unsigned int sampler_size; // TODO statistics - sampler_size = RPS_sampler_get_size (client_sampler); - - if (sampler_size_est_need > sampler_size_client_need) - bigger_size = sampler_size_est_need; - else - bigger_size = sampler_size_client_need; + bigger_size = GNUNET_MAX (sampler_size_est_need, sampler_size_client_need); // TODO respect the min, max resize_wrapper (client_sampler, bigger_size); - LOG (GNUNET_ERROR_TYPE_DEBUG, "sampler_size is now %u\n", sampler_size); + LOG (GNUNET_ERROR_TYPE_DEBUG, "sampler_size_client is now %" PRIu32 "\n", + bigger_size); } -- 2.25.1