Commit 709d0a1b authored by Pieter Noordhuis's avatar Pieter Noordhuis
Browse files

x->backward never equals zsl->header

parent 69d95c3e
......@@ -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;
}
......
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