]> git.saurik.com Git - redis.git/blobdiff - src/redis-cli.c
Fixed issue #435 and at the same time introduced explicit ping in the master-slave...
[redis.git] / src / redis-cli.c
index ca70c9472e4cb26416012a1bd0dabc3c8c8ff77a..08b3a713e3db0f6cdc7dcdd3ee05330676035897 100644 (file)
@@ -414,10 +414,11 @@ static sds cliFormatReplyRaw(redisReply *r) {
 }
 
 static int cliReadReply(int output_raw_strings) {
+    void *_reply;
     redisReply *reply;
     sds out;
 
-    if (redisGetReply(context,(void**)&reply) != REDIS_OK) {
+    if (redisGetReply(context,&_reply) != REDIS_OK) {
         if (config.shutdown)
             return REDIS_OK;
         if (config.interactive) {
@@ -431,6 +432,7 @@ static int cliReadReply(int output_raw_strings) {
         return REDIS_ERR; /* avoid compiler warning */
     }
 
+    reply = (redisReply*)_reply;
     if (output_raw_strings) {
         out = cliFormatReplyRaw(reply);
     } else {