fix unnecessary replace

This commit is contained in:
zliang 2023-08-31 12:45:42 -06:00
parent c20af57cf1
commit e31533bd7a

View File

@ -680,12 +680,12 @@ extern "C" int RedisModule_OnLoad(RedisModuleCtx *ctx, RedisModuleString **argv,
} }
if (podName != nullptr) { if (podName != nullptr) {
m_strPrefix = podName; m_strPrefix = podName;
std::replace(m_strPrefix.begin(), m_strPrefix.end(), '.', '-');
} }
else if (unameResult == 0) { else if (unameResult == 0) {
m_strPrefix = nodeName; m_strPrefix = nodeName;
unameResult = 1; unameResult = 1;
} }
std::replace(m_strPrefix.begin(), m_strPrefix.end(), '.', '-');
for (int iarg = 0; iarg < argc; ++iarg) { for (int iarg = 0; iarg < argc; ++iarg) {
size_t len = 0; size_t len = 0;