diff options
author | Christian Grothoff <christian@grothoff.org> | 2017-12-03 17:16:14 +0100 |
---|---|---|
committer | Christian Grothoff <christian@grothoff.org> | 2017-12-03 17:16:14 +0100 |
commit | 90c803401e6dbe336c6469ff874b0005e7a2f163 (patch) | |
tree | 2e7c79b2bda41d7937da6217c35e890b5e1bf260 /src/set/gnunet-service-set_union_strata_estimator.c | |
parent | 862e488e08ca71db56dedd59059c5bb1a8c130a5 (diff) | |
download | gnunet-90c803401e6dbe336c6469ff874b0005e7a2f163.tar.gz gnunet-90c803401e6dbe336c6469ff874b0005e7a2f163.zip |
fix related to #4909/12605: force desirability of path if path is in use
Diffstat (limited to 'src/set/gnunet-service-set_union_strata_estimator.c')
-rw-r--r-- | src/set/gnunet-service-set_union_strata_estimator.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/src/set/gnunet-service-set_union_strata_estimator.c b/src/set/gnunet-service-set_union_strata_estimator.c index e3d6bfaec..0bd22c92e 100644 --- a/src/set/gnunet-service-set_union_strata_estimator.c +++ b/src/set/gnunet-service-set_union_strata_estimator.c | |||
@@ -228,21 +228,19 @@ unsigned int | |||
228 | strata_estimator_difference (const struct StrataEstimator *se1, | 228 | strata_estimator_difference (const struct StrataEstimator *se1, |
229 | const struct StrataEstimator *se2) | 229 | const struct StrataEstimator *se2) |
230 | { | 230 | { |
231 | int i; | ||
232 | unsigned int count; | 231 | unsigned int count; |
233 | 232 | ||
234 | GNUNET_assert (se1->strata_count == se2->strata_count); | 233 | GNUNET_assert (se1->strata_count == se2->strata_count); |
235 | count = 0; | 234 | count = 0; |
236 | for (i = se1->strata_count - 1; i >= 0; i--) | 235 | for (int i = se1->strata_count - 1; i >= 0; i--) |
237 | { | 236 | { |
238 | struct InvertibleBloomFilter *diff; | 237 | struct InvertibleBloomFilter *diff; |
239 | /* number of keys decoded from the ibf */ | 238 | /* number of keys decoded from the ibf */ |
240 | int ibf_count; | ||
241 | 239 | ||
242 | /* FIXME: implement this without always allocating new IBFs */ | 240 | /* FIXME: implement this without always allocating new IBFs */ |
243 | diff = ibf_dup (se1->strata[i]); | 241 | diff = ibf_dup (se1->strata[i]); |
244 | ibf_subtract (diff, se2->strata[i]); | 242 | ibf_subtract (diff, se2->strata[i]); |
245 | for (ibf_count = 0; GNUNET_YES; ibf_count++) | 243 | for (int ibf_count = 0; GNUNET_YES; ibf_count++) |
246 | { | 244 | { |
247 | int more; | 245 | int more; |
248 | 246 | ||