x->backward never equals zsl->header

This commit is contained in:
Pieter Noordhuis 2010-03-03 18:35:56 +01:00
parent 69d95c3e1c
commit 709d0a1bbc

View File

@ -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;
}