From 709d0a1bbc9a10968b21b694019a78e39ef5f49f Mon Sep 17 00:00:00 2001 From: Pieter Noordhuis Date: Wed, 3 Mar 2010 18:35:56 +0100 Subject: [PATCH] x->backward never equals zsl->header --- redis.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/redis.c b/redis.c index 1abfd96b..f750ca68 100644 --- a/redis.c +++ b/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; } -- 2.45.2