Commit 10c2baa5 authored by antirez's avatar antirez
Browse files

-1 not needed...

parent 6fcb1800
...@@ -5092,7 +5092,7 @@ static int zslRandomLevel(void) { ...@@ -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) {
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment