Skip to content

Commit e31533b

Browse files
committed
fix unnecessary replace
1 parent c20af57 commit e31533b

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

src/modules/keydb_modstatsd/modmain.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -680,12 +680,12 @@ extern "C" int RedisModule_OnLoad(RedisModuleCtx *ctx, RedisModuleString **argv,
680680
}
681681
if (podName != nullptr) {
682682
m_strPrefix = podName;
683+
std::replace(m_strPrefix.begin(), m_strPrefix.end(), '.', '-');
683684
}
684685
else if (unameResult == 0) {
685686
m_strPrefix = nodeName;
686687
unameResult = 1;
687688
}
688-
std::replace(m_strPrefix.begin(), m_strPrefix.end(), '.', '-');
689689

690690
for (int iarg = 0; iarg < argc; ++iarg) {
691691
size_t len = 0;

0 commit comments

Comments
 (0)