traeak commented on code in PR #13837:
URL: https://github.com/apache/trafficserver/pull/13837#discussion_r4275668810


##########
src/proxy/http/remap/NextHopStrategyFactory.cc:
##########
@@ -251,17 +251,27 @@ NextHopStrategyFactory::loadConfigFile(const std::string 
&fileName, std::strings
     std::ifstream file(fileName);
     if (file.is_open()) {
       while (std::getline(file, line)) {
-        if (line[0] == '#') {
-          tok = strtok_r(const_cast<char *>(line.c_str()), sep, &last);
-          if (tok != nullptr && strcmp(tok, "#include") == 0) {
-            std::string f = strtok_r(nullptr, sep, &last);
+        std::string_view line_view{line};
+        if (line_view.starts_with('#')) {
+          const auto directive_end = line_view.find_first_of(separators);

Review Comment:
   NO



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to