mirror of
https://github.com/fluencelabs/redis
synced 2025-06-18 19:51:22 +00:00
-1 not needed...
This commit is contained in:
2
redis.c
2
redis.c
@ -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) {
|
||||
|
Reference in New Issue
Block a user