diff options
author | Christian Grothoff <christian@grothoff.org> | 2021-04-03 07:40:23 +0200 |
---|---|---|
committer | Christian Grothoff <christian@grothoff.org> | 2021-04-03 07:40:23 +0200 |
commit | dbbfcbf2750ac11770f020306d110037ad6f5ed2 (patch) | |
tree | 252d63b66d8980c6f8c8e85f227d0464e69da838 /src/setu | |
parent | 3741f8b677aef80dffdfbc8c142be1ece4494012 (diff) | |
download | gnunet-dbbfcbf2750ac11770f020306d110037ad6f5ed2.tar.gz gnunet-dbbfcbf2750ac11770f020306d110037ad6f5ed2.zip |
indent
Diffstat (limited to 'src/setu')
-rw-r--r-- | src/setu/gnunet-service-setu_strata_estimator.c | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/src/setu/gnunet-service-setu_strata_estimator.c b/src/setu/gnunet-service-setu_strata_estimator.c index 32898f482..9ca1af0eb 100644 --- a/src/setu/gnunet-service-setu_strata_estimator.c +++ b/src/setu/gnunet-service-setu_strata_estimator.c | |||
@@ -62,7 +62,9 @@ strata_estimator_write (const struct StrataEstimator *se, | |||
62 | &cbuf, | 62 | &cbuf, |
63 | &nsize)) | 63 | &nsize)) |
64 | { | 64 | { |
65 | GNUNET_memcpy (buf, cbuf, nsize); | 65 | GNUNET_memcpy (buf, |
66 | cbuf, | ||
67 | nsize); | ||
66 | osize = nsize; | 68 | osize = nsize; |
67 | GNUNET_free (cbuf); | 69 | GNUNET_free (cbuf); |
68 | } | 70 | } |
@@ -224,19 +226,23 @@ strata_estimator_difference (const struct StrataEstimator *se1, | |||
224 | 226 | ||
225 | /* FIXME: implement this without always allocating new IBFs */ | 227 | /* FIXME: implement this without always allocating new IBFs */ |
226 | diff = ibf_dup (se1->strata[i]); | 228 | diff = ibf_dup (se1->strata[i]); |
227 | ibf_subtract (diff, se2->strata[i]); | 229 | ibf_subtract (diff, |
230 | se2->strata[i]); | ||
228 | for (int ibf_count = 0; GNUNET_YES; ibf_count++) | 231 | for (int ibf_count = 0; GNUNET_YES; ibf_count++) |
229 | { | 232 | { |
230 | int more; | 233 | int more; |
231 | 234 | ||
232 | more = ibf_decode (diff, NULL, NULL); | 235 | more = ibf_decode (diff, |
236 | NULL, | ||
237 | NULL); | ||
233 | if (GNUNET_NO == more) | 238 | if (GNUNET_NO == more) |
234 | { | 239 | { |
235 | count += ibf_count; | 240 | count += ibf_count; |
236 | break; | 241 | break; |
237 | } | 242 | } |
238 | /* Estimate if decoding fails or would not terminate */ | 243 | /* Estimate if decoding fails or would not terminate */ |
239 | if ((GNUNET_SYSERR == more) || (ibf_count > diff->size)) | 244 | if ( (GNUNET_SYSERR == more) || |
245 | (ibf_count > diff->size) ) | ||
240 | { | 246 | { |
241 | ibf_destroy (diff); | 247 | ibf_destroy (diff); |
242 | return count * (1 << (i + 1)); | 248 | return count * (1 << (i + 1)); |