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
0b769120
Commit
0b769120
authored
Dec 20, 2016
by
Salvatore Sanfilippo
Committed by
GitHub
Dec 20, 2016
Browse files
Merge pull request #3242 from whatacold/unstable
fix the wrong description of intsetGet().
parents
43bccbc3
0f36e5e5
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/intset.c
View file @
0b769120
...
@@ -261,7 +261,7 @@ int64_t intsetRandom(intset *is) {
...
@@ -261,7 +261,7 @@ int64_t intsetRandom(intset *is) {
return
_intsetGet
(
is
,
rand
()
%
intrev32ifbe
(
is
->
length
));
return
_intsetGet
(
is
,
rand
()
%
intrev32ifbe
(
is
->
length
));
}
}
/*
Sets the value to
the value at the given position. When this position is
/*
Get
the value at the given position. When this position is
* out of range the function returns 0, when in range it returns 1. */
* out of range the function returns 0, when in range it returns 1. */
uint8_t
intsetGet
(
intset
*
is
,
uint32_t
pos
,
int64_t
*
value
)
{
uint8_t
intsetGet
(
intset
*
is
,
uint32_t
pos
,
int64_t
*
value
)
{
if
(
pos
<
intrev32ifbe
(
is
->
length
))
{
if
(
pos
<
intrev32ifbe
(
is
->
length
))
{
...
...
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