diff --git a/src/redis-cli.c b/src/redis-cli.c index c5f29797d..e363a2795 100644 --- a/src/redis-cli.c +++ b/src/redis-cli.c @@ -2871,7 +2871,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 = "";