From 0302c4c43821ac893e8f1071576f80edef5c6398 Mon Sep 17 00:00:00 2001 From: Protobuf Team Bot Date: Fri, 21 Jun 2024 14:15:00 -0700 Subject: [PATCH] Fix typos in parse_context.h. PiperOrigin-RevId: 645498562 --- src/google/protobuf/parse_context.h | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/google/protobuf/parse_context.h b/src/google/protobuf/parse_context.h index 11e0b23bf7..d40e71c1dc 100644 --- a/src/google/protobuf/parse_context.h +++ b/src/google/protobuf/parse_context.h @@ -112,7 +112,7 @@ class PROTOBUF_EXPORT EpsCopyInputStream { // In sanitizer mode we use memory poisoning to guarantee that: // - We do not read an uninitialized token. - // - We would like to verify that this token was consumed, but unforuntately + // - We would like to verify that this token was consumed, but unfortunately // __asan_address_is_poisoned is allowed to have false negatives. class LimitToken { public: @@ -256,9 +256,9 @@ class PROTOBUF_EXPORT EpsCopyInputStream { bool DataAvailable(const char* ptr) { return ptr < limit_end_; } protected: - // Returns true is limit (either an explicit limit or end of stream) is + // Returns true if limit (either an explicit limit or end of stream) is // reached. It aligns *ptr across buffer seams. - // If limit is exceeded it returns true and ptr is set to null. + // If limit is exceeded, it returns true and ptr is set to null. bool DoneWithCheck(const char** ptr, int d) { ABSL_DCHECK(*ptr); if (PROTOBUF_PREDICT_TRUE(*ptr < limit_end_)) return false; @@ -266,7 +266,7 @@ class PROTOBUF_EXPORT EpsCopyInputStream { ABSL_DCHECK_LE(overrun, kSlopBytes); // Guaranteed by parse loop. if (overrun == limit_) { // No need to flip buffers if we ended on a limit. - // If we actually overrun the buffer and next_chunk_ is null. It means + // If we actually overrun the buffer and next_chunk_ is null, it means // the stream ended and we passed the stream end. if (overrun > 0 && next_chunk_ == nullptr) *ptr = nullptr; return true;