]> git.saurik.com Git - redis.git/commitdiff
better use of encoding inforamtion in dictEncObjKeyCompare
authorantirez <antirez@gmail.com>
Tue, 11 May 2010 09:02:24 +0000 (11:02 +0200)
committerantirez <antirez@gmail.com>
Tue, 11 May 2010 09:02:24 +0000 (11:02 +0200)
redis.c

diff --git a/redis.c b/redis.c
index 4f3773d06a245a42fcd7aa88dfad68534306d2e2..4ffe7a09e50fd434273bd44fbe55f9910b400573 100644 (file)
--- a/redis.c
+++ b/redis.c
@@ -1104,8 +1104,8 @@ static int dictEncObjKeyCompare(void *privdata, const void *key1,
     int cmp;
 
     if (o1->encoding == REDIS_ENCODING_INT &&
-        o2->encoding == REDIS_ENCODING_INT &&
-        o1->ptr == o2->ptr) return 1;
+        o2->encoding == REDIS_ENCODING_INT)
+            return o1->ptr == o2->ptr;
 
     o1 = getDecodedObject(o1);
     o2 = getDecodedObject(o2);