mirror of
https://github.com/fluencelabs/redis
synced 2025-03-19 00:50:50 +00:00
A fix for initialization of augmented skip lists
This commit is contained in:
parent
ddfaca9d81
commit
94e543b5c2
5
redis.c
5
redis.c
@ -4861,7 +4861,10 @@ static zskiplist *zslCreate(void) {
|
||||
zsl->header = zslCreateNode(ZSKIPLIST_MAXLEVEL,0,NULL);
|
||||
for (j = 0; j < ZSKIPLIST_MAXLEVEL; j++) {
|
||||
zsl->header->forward[j] = NULL;
|
||||
zsl->header->span[j] = 0;
|
||||
|
||||
/* span has space for ZSKIPLIST_MAXLEVEL-1 elements */
|
||||
if (j < ZSKIPLIST_MAXLEVEL-1)
|
||||
zsl->header->span[j] = 0;
|
||||
}
|
||||
zsl->header->backward = NULL;
|
||||
zsl->tail = NULL;
|
||||
|
Loading…
x
Reference in New Issue
Block a user