Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
ruanhaishen
redis
Commits
1ccb6615
Commit
1ccb6615
authored
Apr 12, 2014
by
antirez
Browse files
Fix HLL sparse object creation.
The function didn't considered the fact that each XZERO opcode is two bytes.
parent
a79386b1
Changes
1
Show whitespace changes
Inline
Side-by-side
src/hyperloglog.c
View file @
1ccb6615
...
...
@@ -913,8 +913,8 @@ robj *createHLLObject(void) {
sds
s
;
uint8_t
*
p
;
int
sparselen
=
HLL_HDR_SIZE
+
((
HLL_REGISTERS
+
(
HLL_SPARSE_XZERO_MAX_LEN
-
1
))
/
HLL_SPARSE_XZERO_MAX_LEN
);
((
(
HLL_REGISTERS
+
(
HLL_SPARSE_XZERO_MAX_LEN
-
1
))
/
HLL_SPARSE_XZERO_MAX_LEN
)
*
2
)
;
int
aux
;
/* Populate the sparse representation with as many XZERO opcodes as
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment