mirror of
https://github.com/fluencelabs/redis
synced 2025-03-19 09:00:51 +00:00
-1 not needed...
This commit is contained in:
parent
6fcb180039
commit
10c2baa50a
2
redis.c
2
redis.c
@ -5092,7 +5092,7 @@ static int zslRandomLevel(void) {
|
|||||||
int level = 1;
|
int level = 1;
|
||||||
while ((random()&0xFFFF) < (ZSKIPLIST_P * 0xFFFF))
|
while ((random()&0xFFFF) < (ZSKIPLIST_P * 0xFFFF))
|
||||||
level += 1;
|
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) {
|
static void zslInsert(zskiplist *zsl, double score, robj *obj) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user