From 09be62f8b2b5dea889f0e9edb6ce16e0aa1a2f2e Mon Sep 17 00:00:00 2001 From: SataQiu Date: Mon, 6 May 2019 16:07:36 +0800 Subject: [PATCH] fix some spelling mistakes --- src/core/ext/transport/chttp2/transport/chttp2_transport.cc | 2 +- src/core/ext/transport/chttp2/transport/internal.h | 4 ++-- src/core/lib/compression/compression_internal.h | 2 +- src/core/lib/compression/stream_compression.h | 4 ++-- src/core/lib/gpr/env.h | 2 +- src/core/lib/gprpp/global_config_custom.h | 2 +- src/core/lib/gprpp/ref_counted.h | 2 +- src/core/lib/iomgr/error_internal.h | 2 +- src/core/lib/iomgr/ev_epoll1_linux.cc | 2 +- src/core/lib/iomgr/udp_server.cc | 4 ++-- src/core/lib/security/security_connector/security_connector.h | 2 +- .../security/security_connector/ssl/ssl_security_connector.cc | 2 +- src/core/lib/slice/b64.h | 4 ++-- src/core/tsi/alts/handshaker/alts_shared_resource.h | 2 +- 14 files changed, 18 insertions(+), 18 deletions(-) diff --git a/src/core/ext/transport/chttp2/transport/chttp2_transport.cc b/src/core/ext/transport/chttp2/transport/chttp2_transport.cc index d4188775722..e085e614d07 100644 --- a/src/core/ext/transport/chttp2/transport/chttp2_transport.cc +++ b/src/core/ext/transport/chttp2/transport/chttp2_transport.cc @@ -1709,7 +1709,7 @@ static void perform_stream_op(grpc_transport* gt, grpc_stream* gs, } static void cancel_pings(grpc_chttp2_transport* t, grpc_error* error) { - /* callback remaining pings: they're not allowed to call into the transpot, + /* callback remaining pings: they're not allowed to call into the transport, and maybe they hold resources that need to be freed */ grpc_chttp2_ping_queue* pq = &t->ping_queue; GPR_ASSERT(error != GRPC_ERROR_NONE); diff --git a/src/core/ext/transport/chttp2/transport/internal.h b/src/core/ext/transport/chttp2/transport/internal.h index 00b1fe18b28..ce009c9c422 100644 --- a/src/core/ext/transport/chttp2/transport/internal.h +++ b/src/core/ext/transport/chttp2/transport/internal.h @@ -225,14 +225,14 @@ class Chttp2IncomingByteStream : public ByteStream { // TODO(roth): When I converted this class to C++, I wanted to make it // inherit from RefCounted or InternallyRefCounted instead of continuing // to use its own custom ref-counting code. However, that would require - // using multiple inheritence, which sucks in general. And to make matters + // using multiple inheritance, which sucks in general. And to make matters // worse, it causes problems with our New<> and Delete<> wrappers. // Specifically, unless RefCounted is first in the list of parent classes, // it will see a different value of the address of the object than the one // we actually allocated, in which case gpr_free() will be called on a // different address than the one we got from gpr_malloc(), thus causing a // crash. Given the fragility of depending on that, as well as a desire to - // avoid multiple inheritence in general, I've decided to leave this + // avoid multiple inheritance in general, I've decided to leave this // alone for now. We can revisit this once we're able to link against // libc++, at which point we can eliminate New<> and Delete<> and // switch to std::shared_ptr<>. diff --git a/src/core/lib/compression/compression_internal.h b/src/core/lib/compression/compression_internal.h index da007368b01..73947a2c34d 100644 --- a/src/core/lib/compression/compression_internal.h +++ b/src/core/lib/compression/compression_internal.h @@ -35,7 +35,7 @@ typedef enum { GRPC_MESSAGE_COMPRESS_ALGORITHMS_COUNT } grpc_message_compression_algorithm; -/** Stream compresssion algorithms supported by gRPC */ +/** Stream compression algorithms supported by gRPC */ typedef enum { GRPC_STREAM_COMPRESS_NONE = 0, GRPC_STREAM_COMPRESS_GZIP, diff --git a/src/core/lib/compression/stream_compression.h b/src/core/lib/compression/stream_compression.h index c80f2f8692b..7328c3ec0f2 100644 --- a/src/core/lib/compression/stream_compression.h +++ b/src/core/lib/compression/stream_compression.h @@ -68,7 +68,7 @@ struct grpc_stream_compression_vtable { * at the end of compression. Emits at most \a max_output_size compressed bytes * into \a out. If all the bytes in input buffer \a in are depleted and \a flush * is not GRPC_STREAM_COMPRESSION_FLUSH_NONE, the corresponding flush method is - * executed. The total number of bytes emitted is outputed in \a output_size. + * executed. The total number of bytes emitted is outputted in \a output_size. * * A SYNC flush indicates that the entire messages in \a in can be decompressed * from \a out. A FINISH flush implies a SYNC flush, and that any further @@ -85,7 +85,7 @@ bool grpc_stream_compress(grpc_stream_compression_context* ctx, * Decompress bytes provided in \a in with a given context. Emits at most \a * max_output_size decompressed bytes into \a out. If decompression process * reached the end of a gzip stream, \a end_of_context is set to true; otherwise - * it is set to false. The total number of bytes emitted is outputed in \a + * it is set to false. The total number of bytes emitted is outputted in \a * output_size. */ bool grpc_stream_decompress(grpc_stream_compression_context* ctx, diff --git a/src/core/lib/gpr/env.h b/src/core/lib/gpr/env.h index 5956d17fcfe..fb9e0636d10 100644 --- a/src/core/lib/gpr/env.h +++ b/src/core/lib/gpr/env.h @@ -26,7 +26,7 @@ /* Env utility functions */ /* Gets the environment variable value with the specified name. - Returns a newly allocated string. It is the responsability of the caller to + Returns a newly allocated string. It is the responsibility of the caller to gpr_free the return value if not NULL (which means that the environment variable exists). */ char* gpr_getenv(const char* name); diff --git a/src/core/lib/gprpp/global_config_custom.h b/src/core/lib/gprpp/global_config_custom.h index dd011fb34bf..175677e07c7 100644 --- a/src/core/lib/gprpp/global_config_custom.h +++ b/src/core/lib/gprpp/global_config_custom.h @@ -19,7 +19,7 @@ #ifndef GRPC_CORE_LIB_GPRPP_GLOBAL_CONFIG_CUSTOM_H #define GRPC_CORE_LIB_GPRPP_GLOBAL_CONFIG_CUSTOM_H -// This is a placeholder for custom global configuration implementaion. +// This is a placeholder for custom global configuration implementation. // To use the custom one, please define following macros here. // // GPR_GLOBAL_CONFIG_DEFINE_BOOL diff --git a/src/core/lib/gprpp/ref_counted.h b/src/core/lib/gprpp/ref_counted.h index 87b342e0093..699f3e8abd0 100644 --- a/src/core/lib/gprpp/ref_counted.h +++ b/src/core/lib/gprpp/ref_counted.h @@ -180,7 +180,7 @@ class RefCount { // So, use NonPolymorphicRefCount only when both of the following conditions // are guaranteed to hold: // (a) Child is a concrete leaf class in RefCounted, and -// (b) you are gauranteed to call Unref only on concrete leaf classes and not +// (b) you are guaranteed to call Unref only on concrete leaf classes and not // their parents. // // The following example is illegal, because calling Unref() will not call diff --git a/src/core/lib/iomgr/error_internal.h b/src/core/lib/iomgr/error_internal.h index 80273960198..7b0cbd6d98f 100644 --- a/src/core/lib/iomgr/error_internal.h +++ b/src/core/lib/iomgr/error_internal.h @@ -49,7 +49,7 @@ struct grpc_error { uint8_t strs[GRPC_ERROR_STR_MAX]; uint8_t times[GRPC_ERROR_TIME_MAX]; // The child errors are stored in the arena, but are effectively a linked list - // structure, since they are contained withing grpc_linked_error objects. + // structure, since they are contained within grpc_linked_error objects. uint8_t first_err; uint8_t last_err; // The arena is dynamically reallocated with a grow factor of 1.5. diff --git a/src/core/lib/iomgr/ev_epoll1_linux.cc b/src/core/lib/iomgr/ev_epoll1_linux.cc index c2165341964..5a3128dafbf 100644 --- a/src/core/lib/iomgr/ev_epoll1_linux.cc +++ b/src/core/lib/iomgr/ev_epoll1_linux.cc @@ -1024,7 +1024,7 @@ static grpc_error* pollset_work(grpc_pollset* ps, process the pending epoll events. The reason for decoupling do_epoll_wait and process_epoll_events is to - better distrubute the work (i.e handling epoll events) across multiple + better distribute the work (i.e handling epoll events) across multiple threads process_epoll_events() returns very quickly: It just queues the work on diff --git a/src/core/lib/iomgr/udp_server.cc b/src/core/lib/iomgr/udp_server.cc index 5f8865ca57f..3e853945555 100644 --- a/src/core/lib/iomgr/udp_server.cc +++ b/src/core/lib/iomgr/udp_server.cc @@ -332,7 +332,7 @@ void GrpcUdpListener::OnFdAboutToOrphan() { GRPC_CLOSURE_INIT(&destroyed_closure_, destroyed_port, server_, grpc_schedule_on_exec_ctx); if (!orphan_notified_ && udp_handler_ != nullptr) { - /* Singals udp_handler that the FD is about to be closed and + /* Signals udp_handler that the FD is about to be closed and * should no longer be used. */ GRPC_CLOSURE_INIT(&orphan_fd_closure_, shutdown_fd, this, grpc_schedule_on_exec_ctx); @@ -645,7 +645,7 @@ int grpc_udp_server_add_port(grpc_udp_server* s, grpc_sockaddr_set_port(addr, allocated_port1); port = allocated_port1; } else if (allocated_port1 >= 0) { - /* The following sucessfully created socket should have same port as + /* The following successfully created socket should have same port as * the first one. */ GPR_ASSERT(port == allocated_port1); } diff --git a/src/core/lib/security/security_connector/security_connector.h b/src/core/lib/security/security_connector/security_connector.h index 4c74c5cfea0..f71ee54402d 100644 --- a/src/core/lib/security/security_connector/security_connector.h +++ b/src/core/lib/security/security_connector/security_connector.h @@ -102,7 +102,7 @@ class grpc_channel_security_connector : public grpc_security_connector { grpc_auth_context* auth_context, grpc_closure* on_call_host_checked, grpc_error** error) GRPC_ABSTRACT; - /// Cancels a pending asychronous call to + /// Cancels a pending asynchronous call to /// grpc_channel_security_connector_check_call_host() with /// \a on_call_host_checked as its callback. virtual void cancel_check_call_host(grpc_closure* on_call_host_checked, diff --git a/src/core/lib/security/security_connector/ssl/ssl_security_connector.cc b/src/core/lib/security/security_connector/ssl/ssl_security_connector.cc index e76f4f15a7c..f920dc6046d 100644 --- a/src/core/lib/security/security_connector/ssl/ssl_security_connector.cc +++ b/src/core/lib/security/security_connector/ssl/ssl_security_connector.cc @@ -310,7 +310,7 @@ class grpc_ssl_server_security_connector private: /* Attempts to fetch the server certificate config if a callback is available. * Current certificate config will continue to be used if the callback returns - * an error. Returns true if new credentials were sucessfully loaded. */ + * an error. Returns true if new credentials were successfully loaded. */ bool try_fetch_ssl_server_credentials() { grpc_ssl_server_certificate_config* certificate_config = nullptr; bool status; diff --git a/src/core/lib/slice/b64.h b/src/core/lib/slice/b64.h index 4475568c25b..88b880a4542 100644 --- a/src/core/lib/slice/b64.h +++ b/src/core/lib/slice/b64.h @@ -23,7 +23,7 @@ #include -/* Encodes data using base64. It is the caller's responsability to free +/* Encodes data using base64. It is the caller's responsibility to free the returned char * using gpr_free. Returns NULL on NULL input. TODO(makdharma) : change the flags to bool from int */ char* grpc_base64_encode(const void* data, size_t data_size, int url_safe, @@ -35,7 +35,7 @@ size_t grpc_base64_estimate_encoded_size(size_t data_size, int url_safe, int multiline); /* Encodes data using base64 and write it to memory pointed to by result. It is - * the caller's responsiblity to allocate enough memory in |result| to fit the + * the caller's responsibility to allocate enough memory in |result| to fit the * encoded data. */ void grpc_base64_encode_core(char* result, const void* vdata, size_t data_size, int url_safe, int multiline); diff --git a/src/core/tsi/alts/handshaker/alts_shared_resource.h b/src/core/tsi/alts/handshaker/alts_shared_resource.h index 8ae0089a11c..d8638e7df69 100644 --- a/src/core/tsi/alts/handshaker/alts_shared_resource.h +++ b/src/core/tsi/alts/handshaker/alts_shared_resource.h @@ -48,7 +48,7 @@ alts_shared_resource_dedicated* grpc_alts_get_shared_resource_dedicated(void); /** * This method destroys the alts_shared_resource_dedicated object - * shared by all TSI handshakes. The applicaiton is responsible for + * shared by all TSI handshakes. The application is responsible for * invoking the API before calling grpc_shutdown(). */ void grpc_alts_shared_resource_dedicated_shutdown();