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
10c2baa5
Commit
10c2baa5
authored
Apr 08, 2010
by
antirez
Browse files
-1 not needed...
parent
6fcb1800
Changes
1
Hide whitespace changes
Inline
Side-by-side
redis.c
View file @
10c2baa5
...
...
@@ -5092,7 +5092,7 @@ static int zslRandomLevel(void) {
int level = 1;
while ((random()&0xFFFF) < (ZSKIPLIST_P * 0xFFFF))
level += 1;
return (level<ZSKIPLIST_MAXLEVEL) ? level :
(
ZSKIPLIST_MAXLEVEL
-1)
;
return (level<ZSKIPLIST_MAXLEVEL) ? level : ZSKIPLIST_MAXLEVEL;
}
static void zslInsert(zskiplist *zsl, double score, robj *obj) {
...
...
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