From 6fcb18003940f8c7f464293677bd7286cad4dce2 Mon Sep 17 00:00:00 2001 From: antirez Date: Thu, 8 Apr 2010 15:56:21 +0200 Subject: [PATCH] Skiplist theoretical fix --- redis.c | 2 +- redis.tcl | 11 ++++++++++- 2 files changed, 11 insertions(+), 2 deletions(-) diff --git a/redis.c b/redis.c index 2a65f36f..00dc6ccc 100644 --- a/redis.c +++ b/redis.c @@ -5092,7 +5092,7 @@ static int zslRandomLevel(void) { int level = 1; while ((random()&0xFFFF) < (ZSKIPLIST_P * 0xFFFF)) level += 1; - return level; + return (level