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
8cc09325
Commit
8cc09325
authored
Apr 14, 2014
by
antirez
Browse files
Fixed memmove() count in hllSparseAdd().
parent
da084bdf
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/hyperloglog.c
View file @
8cc09325
...
...
@@ -802,7 +802,7 @@ int hllSparseAdd(robj *o, unsigned char *ele, size_t elesize) {
int
deltalen
=
seqlen
-
oldlen
;
if
(
deltalen
>
0
&&
sdslen
(
o
->
ptr
)
+
deltalen
>
HLL_SPARSE_MAX
)
goto
promote
;
if
(
deltalen
&&
next
)
memmove
(
next
+
deltalen
,
next
,
next
-
sparse
);
if
(
deltalen
&&
next
)
memmove
(
next
+
deltalen
,
next
,
end
-
next
);
sdsIncrLen
(
o
->
ptr
,
deltalen
);
memcpy
(
p
,
seq
,
seqlen
);
...
...
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