From e4668e86c03e924ea16246d1df4dc083cd0fe56f Mon Sep 17 00:00:00 2001 From: NUAAwqy <146524024+NUAAwqy@users.noreply.github.com> Date: Sat, 24 Oct 2026 12:58:02 +0000 Subject: [PATCH] Fix comment and test-string typos overriden -> overridden (2), occured -> occurred, acess -> access, Sucess -> Success (unasserted test payload). No behavior change. Signed-off-by: NUAAwqy <146524024+NUAAwqy@users.noreply.github.com> --- src/brpc/channel.cpp | 2 +- src/brpc/details/tcmalloc_extension.cpp | 2 +- src/brpc/policy/mongo_protocol.cpp | 2 +- src/butil/reloadable_flags.h | 2 +- test/brpc_http_rpc_protocol_unittest.cpp | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/brpc/channel.cpp b/src/brpc/channel.cpp index de0a1bde49..7b5f0a0da6 100644 --- a/src/brpc/channel.cpp +++ b/src/brpc/channel.cpp @@ -208,7 +208,7 @@ int Channel::InitChannelOptions(const ChannelOptions* options) { // Check connection_type if (_options.connection_type == CONNECTION_TYPE_UNKNOWN) { - // Save has_error which will be overriden in later assignments to + // Save has_error which will be overridden in later assignments to // connection_type. const bool has_error = _options.connection_type.has_error(); diff --git a/src/brpc/details/tcmalloc_extension.cpp b/src/brpc/details/tcmalloc_extension.cpp index a8704270f3..ff8468a3b5 100644 --- a/src/brpc/details/tcmalloc_extension.cpp +++ b/src/brpc/details/tcmalloc_extension.cpp @@ -32,7 +32,7 @@ static void InitGetInstanceFn() { } // namespace MallocExtension* BAIDU_WEAK MallocExtension::instance() { - // On fedora 26, this weak function is NOT overriden by the one in tcmalloc + // On fedora 26, this weak function is NOT overridden by the one in tcmalloc // which is dynamically linked.The same issue can't be re-produced in // Ubuntu and the exact cause is unknown yet. Using dlsym to get the // function works around the issue right now. Note that we can't use dlsym diff --git a/src/brpc/policy/mongo_protocol.cpp b/src/brpc/policy/mongo_protocol.cpp index 1f8ff82ce4..ed86152975 100644 --- a/src/brpc/policy/mongo_protocol.cpp +++ b/src/brpc/policy/mongo_protocol.cpp @@ -148,7 +148,7 @@ ParseResult ParseMongoMessage(butil::IOBuf* source, return MakeParseError(PARSE_ERROR_NOT_ENOUGH_DATA); } // Mongo protocol is a protocol with state. Each connection has its own - // mongo context. (e.g. last error occured on the connection, the cursor + // mongo context. (e.g. last error occurred on the connection, the cursor // created by the last Query). The context is stored in // socket::_input_message, and created at the first time when msg // comes over the socket. diff --git a/src/butil/reloadable_flags.h b/src/butil/reloadable_flags.h index 15a9f98d61..5339ef24f3 100644 --- a/src/butil/reloadable_flags.h +++ b/src/butil/reloadable_flags.h @@ -34,7 +34,7 @@ // // This macro does not work for string-flags because they're thread-unsafe to // modify directly. To emphasize this, you have to write the validator by -// yourself and use GFLAGS_NAMESPACE::GetCommandLineOption() to acess the flag. +// yourself and use GFLAGS_NAMESPACE::GetCommandLineOption() to access the flag. #define BUTIL_VALIDATE_GFLAG(flag, validate_fn) \ namespace butil_flags {} \ const int ALLOW_UNUSED register_FLAGS_ ## flag ## _dummy = \ diff --git a/test/brpc_http_rpc_protocol_unittest.cpp b/test/brpc_http_rpc_protocol_unittest.cpp index 136c0f8b41..fe02ba0a14 100644 --- a/test/brpc_http_rpc_protocol_unittest.cpp +++ b/test/brpc_http_rpc_protocol_unittest.cpp @@ -1528,7 +1528,7 @@ class ServerProgressiveReader : public ReadBody { _destroyed = true; _destroying_st = st; LOG(INFO) << "Destroy ReadBody=" << this << ", " << st; - _cntl->response_attachment().append("Sucess"); + _cntl->response_attachment().append("Success"); } private: brpc::Controller* _cntl;