From bdc783b472769e9881b42ed8c45583ab98a791e8 Mon Sep 17 00:00:00 2001 From: vattezhang Date: Tue, 12 Mar 2019 22:01:02 +0800 Subject: [PATCH] fix: fix the if condition in clusterManagerShowClusterInfo --- src/redis-cli.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/redis-cli.c b/src/redis-cli.c index 0e52c16be..c28dfeeee 100644 --- a/src/redis-cli.c +++ b/src/redis-cli.c @@ -2841,7 +2841,7 @@ static void clusterManagerShowClusterInfo(void) { replicas++; } redisReply *reply = CLUSTER_MANAGER_COMMAND(node, "DBSIZE"); - if (reply != NULL || reply->type == REDIS_REPLY_INTEGER) + if (reply != NULL && reply->type == REDIS_REPLY_INTEGER) dbsize = reply->integer; if (dbsize < 0) { char *err = "";