Cleanup: sentinelGetInstanceTypeString is unused. (#8680)

sentinelGetInstanceTypeString is the same as sentinelRedisInstanceTypeStr,
and not referenced by any functions.
This commit is contained in:
Huang Zhw 2021-03-22 22:13:24 +08:00 committed by GitHub
parent c4ef1efdb7
commit eef45934fa
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1720,13 +1720,6 @@ void sentinelPropagateDownAfterPeriod(sentinelRedisInstance *master) {
} }
} }
char *sentinelGetInstanceTypeString(sentinelRedisInstance *ri) {
if (ri->flags & SRI_MASTER) return "master";
else if (ri->flags & SRI_SLAVE) return "slave";
else if (ri->flags & SRI_SENTINEL) return "sentinel";
else return "unknown";
}
/* This function is used in order to send commands to Redis instances: the /* This function is used in order to send commands to Redis instances: the
* commands we send from Sentinel may be renamed, a common case is a master * commands we send from Sentinel may be renamed, a common case is a master
* with CONFIG and SLAVEOF commands renamed for security concerns. In that * with CONFIG and SLAVEOF commands renamed for security concerns. In that