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
f5c03044
Commit
f5c03044
authored
Apr 12, 2014
by
antirez
Browse files
Fix HLL sparse object creation #2.
Two vars initialized to wrong values in createHLLObject().
parent
b5659cb0
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/hyperloglog.c
View file @
f5c03044
...
...
@@ -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