Merge pull request #5921 from vattezhang/unstable_temp

fix: fix the if condition in clusterManagerShowClusterInfo
This commit is contained in:
Salvatore Sanfilippo 2019-03-13 12:18:08 +01:00 committed by GitHub
commit 53d1dc170c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -2871,7 +2871,7 @@ static void clusterManagerShowClusterInfo(void) {
replicas++; replicas++;
} }
redisReply *reply = CLUSTER_MANAGER_COMMAND(node, "DBSIZE"); 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; dbsize = reply->integer;
if (dbsize < 0) { if (dbsize < 0) {
char *err = ""; char *err = "";