Commit 1750513a authored by antirez's avatar antirez
Browse files

Merge branch 'unstable' of github.com:/antirez/redis into unstable

parents 4387ba6a 5fa6f9eb
...@@ -279,7 +279,7 @@ static redisConfig *getRedisConfig(const char *ip, int port, ...@@ -279,7 +279,7 @@ static redisConfig *getRedisConfig(const char *ip, int port,
for (; i < 2; i++) { for (; i < 2; i++) {
int res = redisGetReply(c, &r); int res = redisGetReply(c, &r);
if (reply) freeReplyObject(reply); if (reply) freeReplyObject(reply);
reply = ((redisReply *) r); reply = res == REDIS_OK ? ((redisReply *) r) : NULL;
if (res != REDIS_OK || !r) goto fail; if (res != REDIS_OK || !r) goto fail;
if (reply->type == REDIS_REPLY_ERROR) { if (reply->type == REDIS_REPLY_ERROR) {
fprintf(stderr, "ERROR: %s\n", reply->str); fprintf(stderr, "ERROR: %s\n", reply->str);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment