mirror of
https://codeberg.org/redict/redict.git
synced 2025-01-22 16:18:28 -05:00
x->backward never equals zsl->header
This commit is contained in:
parent
69d95c3e1c
commit
709d0a1bbc
6
redis.c
6
redis.c
@ -4931,8 +4931,7 @@ static int zslDelete(zskiplist *zsl, double score, robj *obj) {
|
||||
}
|
||||
}
|
||||
if (x->forward[0]) {
|
||||
x->forward[0]->backward = (x->backward == zsl->header) ?
|
||||
NULL : x->backward;
|
||||
x->forward[0]->backward = x->backward;
|
||||
} else {
|
||||
zsl->tail = x->backward;
|
||||
}
|
||||
@ -4977,8 +4976,7 @@ static unsigned long zslDeleteRange(zskiplist *zsl, double min, double max, dict
|
||||
}
|
||||
}
|
||||
if (x->forward[0]) {
|
||||
x->forward[0]->backward = (x->backward == zsl->header) ?
|
||||
NULL : x->backward;
|
||||
x->forward[0]->backward = x->backward;
|
||||
} else {
|
||||
zsl->tail = x->backward;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user