]> git.saurik.com Git - redis.git/commitdiff
fix BLPOP/BRPOP to use the wrapped function for list length
authorPieter Noordhuis <pcnoordhuis@gmail.com>
Tue, 15 Jun 2010 19:16:56 +0000 (21:16 +0200)
committerPieter Noordhuis <pcnoordhuis@gmail.com>
Tue, 15 Jun 2010 19:23:24 +0000 (21:23 +0200)
redis.c

diff --git a/redis.c b/redis.c
index f6a765dad4299c86900449b8c78f1864fd806198..1e1cd78163ed0bef0b7d288ed57b348713c07ac9 100644 (file)
--- a/redis.c
+++ b/redis.c
@@ -8236,8 +8236,7 @@ static void blockingPopGenericCommand(redisClient *c, int where) {
                 addReply(c,shared.wrongtypeerr);
                 return;
             } else {
-                list *list = o->ptr;
-                if (listLength(list) != 0) {
+                if (listTypeLength(o) != 0) {
                     /* If the list contains elements fall back to the usual
                      * non-blocking POP operation */
                     robj *argv[2], **orig_argv;