From eef45934fa1ef20d7297da2871fac87c72ece20a Mon Sep 17 00:00:00 2001 From: Huang Zhw Date: Mon, 22 Mar 2021 22:13:24 +0800 Subject: [PATCH] Cleanup: sentinelGetInstanceTypeString is unused. (#8680) sentinelGetInstanceTypeString is the same as sentinelRedisInstanceTypeStr, and not referenced by any functions. --- src/sentinel.c | 7 ------- 1 file changed, 7 deletions(-) diff --git a/src/sentinel.c b/src/sentinel.c index b598cd732..fbd345a6d 100644 --- a/src/sentinel.c +++ b/src/sentinel.c @@ -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 * 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