You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@kvrocks.apache.org by "git-hulk (via GitHub)" <gi...@apache.org> on 2023/04/20 11:03:41 UTC

[GitHub] [incubator-kvrocks] git-hulk commented on a diff in pull request #1397: Fix CONFIG REWRITE append duplicate newlines

git-hulk commented on code in PR #1397:
URL: https://github.com/apache/incubator-kvrocks/pull/1397#discussion_r1172429808


##########
src/config/config.cc:
##########
@@ -726,8 +726,7 @@ Status Config::Load(const CLIOptions &opts) {
 
     std::string line;
     int line_num = 1;
-    while (!in->eof()) {
-      std::getline(*in, line);
+    while (in.good() && std::getline(*in, line)) {

Review Comment:
   ```suggestion
       while (in->good() && std::getline(*in, line)) {
   ```



-- 
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: issues-unsubscribe@kvrocks.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org