diff --git a/src/google/protobuf/compiler/objectivec/objectivec_helpers.cc b/src/google/protobuf/compiler/objectivec/objectivec_helpers.cc index 86a4adc7d1..5f6e334b06 100644 --- a/src/google/protobuf/compiler/objectivec/objectivec_helpers.cc +++ b/src/google/protobuf/compiler/objectivec/objectivec_helpers.cc @@ -1638,7 +1638,7 @@ class Parser { Parser(LineConsumer* line_consumer) : line_consumer_(line_consumer), line_(0) {} - // Feeds in some input, prase what it can, returning success/failure. Calling + // Feeds in some input, parse what it can, returning success/failure. Calling // again after an error is undefined. bool ParseChunk(StringPiece chunk, std::string* out_error); diff --git a/src/google/protobuf/compiler/objectivec/objectivec_helpers_unittest.cc b/src/google/protobuf/compiler/objectivec/objectivec_helpers_unittest.cc index 6d4225d5d4..3c5eda2265 100644 --- a/src/google/protobuf/compiler/objectivec/objectivec_helpers_unittest.cc +++ b/src/google/protobuf/compiler/objectivec/objectivec_helpers_unittest.cc @@ -251,13 +251,11 @@ class TestLineCollector : public LineConsumer { : lines_(inout_lines), reject_(reject_line), skip_msg_(skip_msg) {} bool ConsumeLine(const StringPiece& line, std::string* out_error) override { - if (reject_) { - if (*reject_ == line) { - if (!skip_msg_) { - *out_error = std::string("Rejected '") + *reject_ + "'"; - } - return false; + if (reject_ && *reject_ == line) { + if (!skip_msg_) { + *out_error = std::string("Rejected '") + *reject_ + "'"; } + return false; } if (lines_) { lines_->emplace_back(line);