aboutsummaryrefslogtreecommitdiff
path: root/src/setu/gnunet-service-setu_strata_estimator.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/setu/gnunet-service-setu_strata_estimator.c')
-rw-r--r--src/setu/gnunet-service-setu_strata_estimator.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/setu/gnunet-service-setu_strata_estimator.c b/src/setu/gnunet-service-setu_strata_estimator.c
index 9ca1af0eb..7c9a4deb6 100644
--- a/src/setu/gnunet-service-setu_strata_estimator.c
+++ b/src/setu/gnunet-service-setu_strata_estimator.c
@@ -136,10 +136,11 @@ strata_estimator_insert (struct StrataEstimator *se,
136 struct IBF_Key key) 136 struct IBF_Key key)
137{ 137{
138 uint64_t v; 138 uint64_t v;
139 unsigned int i;
139 140
140 v = key.key_val; 141 v = key.key_val;
141 /* count trailing '1'-bits of v */ 142 /* count trailing '1'-bits of v */
142 for (unsigned int i = 0; v & 1; v >>= 1, i++) 143 for (i = 0; v & 1; v >>= 1, i++)
143 /* empty */; 144 /* empty */;
144 ibf_insert (se->strata[i], key); 145 ibf_insert (se->strata[i], key);
145} 146}
@@ -156,10 +157,11 @@ strata_estimator_remove (struct StrataEstimator *se,
156 struct IBF_Key key) 157 struct IBF_Key key)
157{ 158{
158 uint64_t v; 159 uint64_t v;
160 unsigned int i;
159 161
160 v = key.key_val; 162 v = key.key_val;
161 /* count trailing '1'-bits of v */ 163 /* count trailing '1'-bits of v */
162 for (unsigned int i = 0; v & 1; v >>= 1, i++) 164 for (i = 0; v & 1; v >>= 1, i++)
163 /* empty */; 165 /* empty */;
164 ibf_remove (se->strata[i], key); 166 ibf_remove (se->strata[i], key);
165} 167}