[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[GNUnet-SVN] r36484 - gnunet/src/set
From: |
gnunet |
Subject: |
[GNUnet-SVN] r36484 - gnunet/src/set |
Date: |
Thu, 8 Oct 2015 13:54:50 +0200 |
Author: grothoff
Date: 2015-10-08 13:54:50 +0200 (Thu, 08 Oct 2015)
New Revision: 36484
Modified:
gnunet/src/set/gnunet-service-set_union_strata_estimator.c
Log:
-make code nicer
Modified: gnunet/src/set/gnunet-service-set_union_strata_estimator.c
===================================================================
--- gnunet/src/set/gnunet-service-set_union_strata_estimator.c 2015-10-08
11:51:39 UTC (rev 36483)
+++ gnunet/src/set/gnunet-service-set_union_strata_estimator.c 2015-10-08
11:54:50 UTC (rev 36484)
@@ -47,8 +47,8 @@
strata_estimator_write (const struct StrataEstimator *se,
void *buf)
{
+ char *sbuf = buf;
unsigned int i;
- void *sbuf = buf;
size_t osize;
GNUNET_assert (NULL != se);
@@ -57,8 +57,7 @@
ibf_write_slice (se->strata[i],
0,
se->ibf_size,
- buf);
- buf += se->ibf_size * IBF_BUCKET_SIZE;
+ &sbuf[se->ibf_size * IBF_BUCKET_SIZE * i]);
}
osize = se->ibf_size * IBF_BUCKET_SIZE * se->strata_count;
#if FAIL_10_1_COMPATIBILTIY
@@ -67,12 +66,12 @@
size_t nsize;
if (GNUNET_YES ==
- GNUNET_try_compression (sbuf,
+ GNUNET_try_compression (buf,
osize,
&cbuf,
&nsize))
{
- memcpy (sbuf, cbuf, nsize);
+ memcpy (buf, cbuf, nsize);
osize = nsize;
GNUNET_free (cbuf);
}
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [GNUnet-SVN] r36484 - gnunet/src/set,
gnunet <=