aboutsummaryrefslogtreecommitdiff
path: root/src/set/gnunet-service-set_union_strata_estimator.c
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2015-10-08 11:51:39 +0000
committerChristian Grothoff <christian@grothoff.org>2015-10-08 11:51:39 +0000
commitadc4031ecb1942d33f6bf889c8ddb14197863d2e (patch)
treebd20653660751945e0b2b39c600ef5bafb7d32c3 /src/set/gnunet-service-set_union_strata_estimator.c
parent8050537b40daab7a43e3da6fb2f01b3b873ebb77 (diff)
downloadgnunet-adc4031ecb1942d33f6bf889c8ddb14197863d2e.tar.gz
gnunet-adc4031ecb1942d33f6bf889c8ddb14197863d2e.zip
-fix ptr ar
Diffstat (limited to 'src/set/gnunet-service-set_union_strata_estimator.c')
-rw-r--r--src/set/gnunet-service-set_union_strata_estimator.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/set/gnunet-service-set_union_strata_estimator.c b/src/set/gnunet-service-set_union_strata_estimator.c
index 7b81b4987..ad1dda100 100644
--- a/src/set/gnunet-service-set_union_strata_estimator.c
+++ b/src/set/gnunet-service-set_union_strata_estimator.c
@@ -33,7 +33,7 @@
33 * Should we try compressing the strata estimator? This will 33 * Should we try compressing the strata estimator? This will
34 * break compatibility with the 0.10.1-network. 34 * break compatibility with the 0.10.1-network.
35 */ 35 */
36#define FAIL_10_1_COMPATIBILTIY 0 36#define FAIL_10_1_COMPATIBILTIY 1
37 37
38 38
39/** 39/**
@@ -48,6 +48,7 @@ strata_estimator_write (const struct StrataEstimator *se,
48 void *buf) 48 void *buf)
49{ 49{
50 unsigned int i; 50 unsigned int i;
51 void *sbuf = buf;
51 size_t osize; 52 size_t osize;
52 53
53 GNUNET_assert (NULL != se); 54 GNUNET_assert (NULL != se);
@@ -66,12 +67,12 @@ strata_estimator_write (const struct StrataEstimator *se,
66 size_t nsize; 67 size_t nsize;
67 68
68 if (GNUNET_YES == 69 if (GNUNET_YES ==
69 GNUNET_try_compression (buf, 70 GNUNET_try_compression (sbuf,
70 osize, 71 osize,
71 &cbuf, 72 &cbuf,
72 &nsize)) 73 &nsize))
73 { 74 {
74 memcpy (buf, cbuf, nsize); 75 memcpy (sbuf, cbuf, nsize);
75 osize = nsize; 76 osize = nsize;
76 GNUNET_free (cbuf); 77 GNUNET_free (cbuf);
77 } 78 }