Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
ruanhaishen
redis
Commits
2c1fa111
Commit
2c1fa111
authored
Apr 12, 2014
by
antirez
Browse files
Fix HLL sparse object creation #2.
Two vars initialized to wrong values in createHLLObject().
parent
0b9f09c4
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/hyperloglog.c
View file @
2c1fa111
...
...
@@ -925,11 +925,11 @@ robj *createHLLObject(void) {
/* Populate the sparse representation with as many XZERO opcodes as
* needed to represent all the registers. */
aux
=
sparselen
;
aux
=
HLL_REGISTERS
;
s
=
sdsnewlen
(
NULL
,
sparselen
);
p
=
(
uint8_t
*
)
s
+
HLL_HDR_SIZE
;
while
(
aux
)
{
int
xzero
=
HLL_SPARSE_XZERO_MAX_LEN
-
1
;
int
xzero
=
HLL_SPARSE_XZERO_MAX_LEN
;
if
(
xzero
>
aux
)
xzero
=
aux
;
HLL_SPARSE_XZERO_SET
(
p
,
xzero
);
p
+=
2
;
...
...
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