chiark
/
gitweb
/
~ianmdlvl
/
elogind.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
sd-bus: also allow setting descriptions on bus slots
[elogind.git]
/
src
/
libsystemd
/
sd-bus
/
bus-bloom.c
diff --git
a/src/libsystemd/sd-bus/bus-bloom.c
b/src/libsystemd/sd-bus/bus-bloom.c
index e1542969942ab706b7608d98255786e8832e392c..3556774074c38ad9d3492d8f9cde0652bcc55891 100644
(file)
--- a/
src/libsystemd/sd-bus/bus-bloom.c
+++ b/
src/libsystemd/sd-bus/bus-bloom.c
@@
-48,6
+48,7
@@
static void bloom_add_data(
uint8_t h[8];
uint64_t m;
unsigned w, i, c = 0;
uint8_t h[8];
uint64_t m;
unsigned w, i, c = 0;
+ unsigned hash_index;
assert(size > 0);
assert(k > 0);
assert(size > 0);
assert(k > 0);
@@
-65,13
+66,13
@@
static void bloom_add_data(
* hash value for each 128 bits of hash key. */
assert(k * w <= ELEMENTSOF(hash_keys) * 8);
* hash value for each 128 bits of hash key. */
assert(k * w <= ELEMENTSOF(hash_keys) * 8);
- for (i = 0; i < k; i++) {
+ for (i = 0
, hash_index = 0
; i < k; i++) {
uint64_t p = 0;
unsigned d;
for (d = 0; d < w; d++) {
if (c <= 0) {
uint64_t p = 0;
unsigned d;
for (d = 0; d < w; d++) {
if (c <= 0) {
- siphash24(h, data, n, hash_keys[
i
++].bytes);
+ siphash24(h, data, n, hash_keys[
hash_index
++].bytes);
c += 8;
}
c += 8;
}