diff --git a/src/ConfigParser.cc b/src/ConfigParser.cc index 5c3fdcc8839..d7714832099 100644 --- a/src/ConfigParser.cc +++ b/src/ConfigParser.cc @@ -532,18 +532,6 @@ ConfigParser::NextQuotedToken() return token; } -SBuf -ConfigParser::QuoteString(const SBuf &var) -{ - static CharacterSet alphanumeric = CharacterSet::ALPHA + CharacterSet::DIGIT; - - // skip if nothing to do - if (var.findFirstNotOf(alphanumeric) == SBuf::npos) - return var; - - return Format::DquoteString(var); -} - void ConfigParser::rejectDuplicateDirective() { diff --git a/src/ConfigParser.h b/src/ConfigParser.h index 8d1dde8bb7a..79d52d005b7 100644 --- a/src/ConfigParser.h +++ b/src/ConfigParser.h @@ -82,7 +82,6 @@ class ConfigParser static void ParseUShort(unsigned short *var); static void ParseBool(bool *var); - static SBuf QuoteString(const SBuf &); static void ParseWordList(wordlist **list); /** diff --git a/src/tests/testConfigParser.cc b/src/tests/testConfigParser.cc index b5779d4018f..e05c549d3d7 100644 --- a/src/tests/testConfigParser.cc +++ b/src/tests/testConfigParser.cc @@ -43,10 +43,6 @@ TestConfigParser::testParseQuoted() }}; for(const auto &t : tokens) { - - const auto quoted = ConfigParser::QuoteString(t.second); - CPPUNIT_ASSERT_EQUAL(t.first, quoted); - auto *line = SBufToCstring(t.first); ConfigParser::SetCfgLine(line); const SBuf found(ConfigParser::NextToken());