From 1056c7c93a3878b4ad04da72f4a5553b53416073 Mon Sep 17 00:00:00 2001 From: Jonathan Hui Date: Fri, 11 Jan 2019 09:03:10 -0800 Subject: [PATCH] [style] fix typos (#3451) --- examples/platforms/cc2538/diag.c | 2 +- examples/platforms/cc2538/radio.c | 2 +- examples/platforms/efr32/diag.c | 2 +- examples/platforms/gp712/diag.c | 2 +- examples/platforms/kw41z/diag.c | 2 +- examples/platforms/posix/diag.c | 2 +- examples/platforms/posix/uart-posix.c | 2 +- examples/platforms/posix/uart-windows.c | 2 +- examples/platforms/samr21/diag.c | 2 +- src/cli/cli_coap_secure.cpp | 4 ++-- src/core/coap/coap_secure.cpp | 4 ++-- src/core/common/extension.hpp | 2 +- src/core/common/tlvs.hpp | 2 +- src/core/crypto/ecdsa.hpp | 2 +- src/core/mac/mac.cpp | 4 ++-- src/core/meshcop/commissioner.cpp | 20 ++++++++++---------- src/core/meshcop/commissioner.hpp | 18 +++++++++--------- src/core/meshcop/leader.hpp | 2 +- src/core/meshcop/meshcop_tlvs.hpp | 2 +- src/core/net/dhcp6_client.hpp | 2 +- src/core/net/ip6.hpp | 2 +- src/core/thread/announce_sender.hpp | 2 +- src/core/thread/child_table.hpp | 8 ++++---- src/core/thread/mesh_forwarder.hpp | 2 +- src/core/thread/mesh_forwarder_ftd.cpp | 4 ++-- src/core/thread/mle_router_ftd.hpp | 2 +- src/core/thread/thread_netif.cpp | 2 +- src/core/utils/channel_manager.cpp | 4 ++-- src/core/utils/channel_manager.hpp | 4 ++-- src/core/utils/child_supervision.hpp | 2 +- src/ncp/ncp_buffer.cpp | 2 +- src/ncp/ncp_spi.hpp | 2 +- src/ncp/spinel_encoder.hpp | 2 +- src/posix/platform/hdlc_interface.hpp | 2 +- 34 files changed, 60 insertions(+), 60 deletions(-) diff --git a/examples/platforms/cc2538/diag.c b/examples/platforms/cc2538/diag.c index f9628bd8d..4b62a2c09 100644 --- a/examples/platforms/cc2538/diag.c +++ b/examples/platforms/cc2538/diag.c @@ -50,7 +50,7 @@ void otPlatDiagProcess(otInstance *aInstance, int argc, char *argv[], char *aOut OT_UNUSED_VARIABLE(argc); OT_UNUSED_VARIABLE(aInstance); - // Add more plarform specific diagnostics features here. + // Add more platform specific diagnostics features here. snprintf(aOutput, aOutputMaxLen, "diag feature '%s' is not supported\r\n", argv[0]); } diff --git a/examples/platforms/cc2538/radio.c b/examples/platforms/cc2538/radio.c index bade66e06..23e70c813 100644 --- a/examples/platforms/cc2538/radio.c +++ b/examples/platforms/cc2538/radio.c @@ -577,7 +577,7 @@ void cc2538RadioProcess(otInstance *aInstance) else #endif { - // signal MAC layer for each received frame if promiscous is enabled + // signal MAC layer for each received frame if promiscuous is enabled // otherwise only signal MAC layer for non-ACK frame if (((HWREG(RFCORE_XREG_FRMFILT0) & RFCORE_XREG_FRMFILT0_FRAME_FILTER_EN) == 0) || (sReceiveFrame.mLength > IEEE802154_ACK_LENGTH)) diff --git a/examples/platforms/efr32/diag.c b/examples/platforms/efr32/diag.c index 4bf7cfccc..97277be48 100644 --- a/examples/platforms/efr32/diag.c +++ b/examples/platforms/efr32/diag.c @@ -56,7 +56,7 @@ void otPlatDiagProcess(otInstance *aInstance, int argc, char *argv[], char *aOut OT_UNUSED_VARIABLE(aInstance); OT_UNUSED_VARIABLE(argc); - // Add more plarform specific diagnostics features here. + // Add more platform specific diagnostics features here. snprintf(aOutput, aOutputMaxLen, "diag feature '%s' is not supported\r\n", argv[0]); } diff --git a/examples/platforms/gp712/diag.c b/examples/platforms/gp712/diag.c index 7f9a87629..a3fa9ae1f 100644 --- a/examples/platforms/gp712/diag.c +++ b/examples/platforms/gp712/diag.c @@ -48,7 +48,7 @@ void otPlatDiagProcess(otInstance *aInstance, int argc, char *argv[], char *aOut OT_UNUSED_VARIABLE(aInstance); OT_UNUSED_VARIABLE(argc); - // Add more plarform specific diagnostics features here. + // Add more platform specific diagnostics features here. snprintf(aOutput, aOutputMaxLen, "diag feature '%s' is not supported\r\n", argv[0]); } diff --git a/examples/platforms/kw41z/diag.c b/examples/platforms/kw41z/diag.c index ce18dde3d..a5d6e3824 100644 --- a/examples/platforms/kw41z/diag.c +++ b/examples/platforms/kw41z/diag.c @@ -54,7 +54,7 @@ void otPlatDiagProcess(otInstance *aInstance, int argc, char *argv[], char *aOut OT_UNUSED_VARIABLE(aInstance); OT_UNUSED_VARIABLE(argc); - // Add more plarform specific diagnostics features here. + // Add more platform specific diagnostics features here. snprintf(aOutput, aOutputMaxLen, "diag feature '%s' is not supported\r\n", argv[0]); } diff --git a/examples/platforms/posix/diag.c b/examples/platforms/posix/diag.c index d56d30d50..6e305dbc4 100644 --- a/examples/platforms/posix/diag.c +++ b/examples/platforms/posix/diag.c @@ -50,7 +50,7 @@ void otPlatDiagProcess(otInstance *aInstance, int argc, char *argv[], char *aOut OT_UNUSED_VARIABLE(aInstance); OT_UNUSED_VARIABLE(argc); - // Add more plarform specific diagnostics features here. + // Add more platform specific diagnostics features here. snprintf(aOutput, aOutputMaxLen, "diag feature '%s' is not supported\r\n", argv[0]); } diff --git a/examples/platforms/posix/uart-posix.c b/examples/platforms/posix/uart-posix.c index f2d3c8079..52c9776a8 100644 --- a/examples/platforms/posix/uart-posix.c +++ b/examples/platforms/posix/uart-posix.c @@ -309,7 +309,7 @@ void otPlatDebugUart_putchar_raw(int c) * in some/many cases duplicate cr because in * some cases the log function {ie: Mbed} already * includes the CR or LF... but other log functions - * do not include cr/lf and expect it appened + * do not include cr/lf and expect it appended */ fp = posix_logfile; diff --git a/examples/platforms/posix/uart-windows.c b/examples/platforms/posix/uart-windows.c index 30bbba69d..512185077 100644 --- a/examples/platforms/posix/uart-windows.c +++ b/examples/platforms/posix/uart-windows.c @@ -100,7 +100,7 @@ otError otPlatUartDisable(void) // Set the shutdown event SetEvent(s_StopWorkerEvent); - // Wait for the worker to compelte + // Wait for the worker to complete WaitForSingleObject(s_WorkerThread, INFINITE); CloseHandle(s_WorkerThread); diff --git a/examples/platforms/samr21/diag.c b/examples/platforms/samr21/diag.c index 2eaddc46e..9b0acd3ec 100644 --- a/examples/platforms/samr21/diag.c +++ b/examples/platforms/samr21/diag.c @@ -50,7 +50,7 @@ void otPlatDiagProcess(otInstance *aInstance, int argc, char *argv[], char *aOut OT_UNUSED_VARIABLE(aInstance); OT_UNUSED_VARIABLE(argc); - // Add more plarform specific diagnostics features here. + // Add more platform specific diagnostics features here. snprintf(aOutput, aOutputMaxLen, "diag feature '%s' is not supported\r\n", argv[0]); } diff --git a/src/cli/cli_coap_secure.cpp b/src/cli/cli_coap_secure.cpp index 8003b03fe..d90462546 100644 --- a/src/cli/cli_coap_secure.cpp +++ b/src/cli/cli_coap_secure.cpp @@ -276,9 +276,9 @@ otError CoapSecure::Process(int argc, char *argv[]) mInterpreter.mServer->OutputFormat(">'coaps start (false)' " ": start coap secure service, false disable peer cert verification\r\n"); mInterpreter.mServer->OutputFormat(">'coaps set psk ' " - ": set Preshared Key and Client Identity (Ciphresuit PSK_AES128)\r\n"); + ": set Preshared Key and Client Identity (Ciphersuite PSK_AES128)\r\n"); mInterpreter.mServer->OutputFormat(">'coaps set x509' " - ": set X509 Cert und Private Key (Ciphresuit ECDHE_ECDSA_AES128)\r\n"); + ": set X509 Cert und Private Key (Ciphersuite ECDHE_ECDSA_AES128)\r\n"); mInterpreter.mServer->OutputFormat(">'coaps connect (port)' " ": start dtls session with a server\r\n"); mInterpreter.mServer->OutputFormat(">'coaps get' 'coaps put' 'coaps post' 'coaps delete' " diff --git a/src/core/coap/coap_secure.cpp b/src/core/coap/coap_secure.cpp index af760ebbf..f78804ccd 100644 --- a/src/core/coap/coap_secure.cpp +++ b/src/core/coap/coap_secure.cpp @@ -167,9 +167,9 @@ otError CoapSecure::SetCertificate(const uint8_t *aX509Cert, return GetNetif().GetDtls().SetCertificate(aX509Cert, aX509Length, aPrivateKey, aPrivateKeyLength); } -otError CoapSecure::SetCaCertificateChain(const uint8_t *aX509CaCertificateChain, uint32_t aX509CaCertChainLenth) +otError CoapSecure::SetCaCertificateChain(const uint8_t *aX509CaCertificateChain, uint32_t aX509CaCertChainLength) { - return GetNetif().GetDtls().SetCaCertificateChain(aX509CaCertificateChain, aX509CaCertChainLenth); + return GetNetif().GetDtls().SetCaCertificateChain(aX509CaCertificateChain, aX509CaCertChainLength); } #endif // MBEDTLS_KEY_EXCHANGE_ECDHE_ECDSA_ENABLED diff --git a/src/core/common/extension.hpp b/src/core/common/extension.hpp index 9e13f292d..2a5a543ca 100644 --- a/src/core/common/extension.hpp +++ b/src/core/common/extension.hpp @@ -93,7 +93,7 @@ public: * @param[in] aNcpInstance A reference to the NCP object. * */ - void SignalNcpInit(Ncp::NcpBase &aNcpInsatnce); + void SignalNcpInit(Ncp::NcpBase &aNcpInstance); protected: /** diff --git a/src/core/common/tlvs.hpp b/src/core/common/tlvs.hpp index ef3305a55..2f5e2b8b7 100644 --- a/src/core/common/tlvs.hpp +++ b/src/core/common/tlvs.hpp @@ -168,7 +168,7 @@ public: * @retval OT_ERROR_NOT_FOUND Could not find the TLV with Type @p aType. * */ - static otError GetValueOffset(const Message &aMesasge, uint8_t aType, uint16_t &aOffset, uint16_t &aLength); + static otError GetValueOffset(const Message &aMessage, uint8_t aType, uint16_t &aOffset, uint16_t &aLength); protected: /** diff --git a/src/core/crypto/ecdsa.hpp b/src/core/crypto/ecdsa.hpp index 63d36e2c7..fdefae483 100644 --- a/src/core/crypto/ecdsa.hpp +++ b/src/core/crypto/ecdsa.hpp @@ -71,7 +71,7 @@ public: * @retval OT_ERROR_NONE ECDSA sign has been created successfully. * @retval OT_ERROR_NO_BUFS Output buffer is too small. * @retval OT_ERROR_INVALID_ARGS Private key is not valid EC Private Key. - * @rerval OT_ERROR_FAILED Error during signing. + * @retval OT_ERROR_FAILED Error during signing. */ static otError Sign(uint8_t * aOutput, uint16_t * aOutputLength, diff --git a/src/core/mac/mac.cpp b/src/core/mac/mac.cpp index b373c6eae..ee36f2b8e 100644 --- a/src/core/mac/mac.cpp +++ b/src/core/mac/mac.cpp @@ -318,7 +318,7 @@ void Mac::SetRxOnWhenIdle(bool aRxOnWhenIdle) mRxOnWhenIdle = aRxOnWhenIdle; // If the new value for `mRxOnWhenIdle` is `true` (i.e., radio should - // remain in Rx while idle) we stop any ongoing or pending `WaitinForData` + // remain in Rx while idle) we stop any ongoing or pending `WaitingForData` // operation (since this operation only applies to sleepy devices). if (mRxOnWhenIdle) @@ -795,7 +795,7 @@ bool Mac::ShouldSendBeacon(void) const // When `ENABLE_BEACON_RSP_WHEN_JOINABLE` feature is enabled, // the device should transmit IEEE 802.15.4 Beacons in response // to IEEE 802.15.4 Beacon Requests even while the device is not - // router capable and detached (i.e., `IsBeaconeEnabled()` is + // router capable and detached (i.e., `IsBeaconEnabled()` is // false) but only if it is in joinable state (unsecure port // list is not empty). diff --git a/src/core/meshcop/commissioner.cpp b/src/core/meshcop/commissioner.cpp index d8d48fb5a..530a7c7bc 100644 --- a/src/core/meshcop/commissioner.cpp +++ b/src/core/meshcop/commissioner.cpp @@ -474,15 +474,15 @@ void Commissioner::HandleMgmtCommissionerGetResponse(void * aConte const otMessageInfo *aMessageInfo, otError aResult) { - static_cast(aContext)->HandleMgmtCommissisonerGetResponse( + static_cast(aContext)->HandleMgmtCommissionerGetResponse( static_cast(aHeader), static_cast(aMessage), static_cast(aMessageInfo), aResult); } -void Commissioner::HandleMgmtCommissisonerGetResponse(Coap::Header * aHeader, - Message * aMessage, - const Ip6::MessageInfo *aMessageInfo, - otError aResult) +void Commissioner::HandleMgmtCommissionerGetResponse(Coap::Header * aHeader, + Message * aMessage, + const Ip6::MessageInfo *aMessageInfo, + otError aResult) { OT_UNUSED_VARIABLE(aMessage); OT_UNUSED_VARIABLE(aMessageInfo); @@ -579,15 +579,15 @@ void Commissioner::HandleMgmtCommissionerSetResponse(void * aConte const otMessageInfo *aMessageInfo, otError aResult) { - static_cast(aContext)->HandleMgmtCommissisonerSetResponse( + static_cast(aContext)->HandleMgmtCommissionerSetResponse( static_cast(aHeader), static_cast(aMessage), static_cast(aMessageInfo), aResult); } -void Commissioner::HandleMgmtCommissisonerSetResponse(Coap::Header * aHeader, - Message * aMessage, - const Ip6::MessageInfo *aMessageInfo, - otError aResult) +void Commissioner::HandleMgmtCommissionerSetResponse(Coap::Header * aHeader, + Message * aMessage, + const Ip6::MessageInfo *aMessageInfo, + otError aResult) { OT_UNUSED_VARIABLE(aMessage); OT_UNUSED_VARIABLE(aMessageInfo); diff --git a/src/core/meshcop/commissioner.hpp b/src/core/meshcop/commissioner.hpp index 9095efa1f..071be7637 100644 --- a/src/core/meshcop/commissioner.hpp +++ b/src/core/meshcop/commissioner.hpp @@ -162,7 +162,7 @@ public: * * @retval OT_COMMISSIONER_STATE_DISABLED Commissioner disabled. * @retval OT_COMMISSIONER_STATE_PETITION Becoming the commissioner. - * @retval OT_COMIMSSIONER_STATE_ACTIVE Commissioner enabled. + * @retval OT_COMMISSIONER_STATE_ACTIVE Commissioner enabled. * */ otCommissionerState GetState(void) const; @@ -265,19 +265,19 @@ private: otMessage * aMessage, const otMessageInfo *aMessageInfo, otError aResult); - void HandleMgmtCommissisonerSetResponse(Coap::Header * aHeader, - Message * aMessage, - const Ip6::MessageInfo *aMessageInfo, - otError aResult); + void HandleMgmtCommissionerSetResponse(Coap::Header * aHeader, + Message * aMessage, + const Ip6::MessageInfo *aMessageInfo, + otError aResult); static void HandleMgmtCommissionerGetResponse(void * aContext, otCoapHeader * aHeader, otMessage * aMessage, const otMessageInfo *aMessageInfo, otError aResult); - void HandleMgmtCommissisonerGetResponse(Coap::Header * aHeader, - Message * aMessage, - const Ip6::MessageInfo *aMessageInfo, - otError aResult); + void HandleMgmtCommissionerGetResponse(Coap::Header * aHeader, + Message * aMessage, + const Ip6::MessageInfo *aMessageInfo, + otError aResult); static void HandleLeaderPetitionResponse(void * aContext, otCoapHeader * aHeader, otMessage * aMessage, diff --git a/src/core/meshcop/leader.hpp b/src/core/meshcop/leader.hpp index 4855ad65c..69a43181a 100644 --- a/src/core/meshcop/leader.hpp +++ b/src/core/meshcop/leader.hpp @@ -97,7 +97,7 @@ public: /** * This method gets minimal delay timer. * - * @retval the miniaml delay timer (in ms). + * @retval the minimal delay timer (in ms). * */ uint32_t GetDelayTimerMinimal(void) const; diff --git a/src/core/meshcop/meshcop_tlvs.hpp b/src/core/meshcop/meshcop_tlvs.hpp index 8193a34d2..b10866c12 100644 --- a/src/core/meshcop/meshcop_tlvs.hpp +++ b/src/core/meshcop/meshcop_tlvs.hpp @@ -73,7 +73,7 @@ public: kChannel = OT_MESHCOP_TLV_CHANNEL, ///< Channel TLV kPanId = OT_MESHCOP_TLV_PANID, ///< PAN ID TLV kExtendedPanId = OT_MESHCOP_TLV_EXTPANID, ///< Extended PAN ID TLV - kNetworkName = OT_MESHCOP_TLV_NETWORKNAME, ///< Newtork Name TLV + kNetworkName = OT_MESHCOP_TLV_NETWORKNAME, ///< Network Name TLV kPSKc = OT_MESHCOP_TLV_PSKC, ///< PSKc TLV kNetworkMasterKey = OT_MESHCOP_TLV_MASTERKEY, ///< Network Master Key TLV kNetworkKeySequence = OT_MESHCOP_TLV_NETWORK_KEY_SEQUENCE, ///< Network Key Sequence TLV diff --git a/src/core/net/dhcp6_client.hpp b/src/core/net/dhcp6_client.hpp index f0e4fb2fd..850ae26e9 100644 --- a/src/core/net/dhcp6_client.hpp +++ b/src/core/net/dhcp6_client.hpp @@ -91,7 +91,7 @@ struct IdentityAssociation uint32_t mPreferredLifetime; ///< The preferred lifetime. uint32_t mValidLifetime; ///< The valid lifetime. uint16_t mPrefixAgentRloc; ///< Rloc of Prefix Agent - uint8_t mStatus; ///< Status of IdentityAssocation + uint8_t mStatus; ///< Status of IdentityAssociation }; /** diff --git a/src/core/net/ip6.hpp b/src/core/net/ip6.hpp index 813df0aad..ce9b44c4f 100644 --- a/src/core/net/ip6.hpp +++ b/src/core/net/ip6.hpp @@ -403,7 +403,7 @@ public: Udp &GetUdp(void) { return mUdp; } /** - * This method returns a reference to the UDMPL message processing controller instance. + * This method returns a reference to the MPL message processing controller instance. * * @returns A reference to the Mpl instance. * diff --git a/src/core/thread/announce_sender.hpp b/src/core/thread/announce_sender.hpp index ccf859dcd..e2f747633 100644 --- a/src/core/thread/announce_sender.hpp +++ b/src/core/thread/announce_sender.hpp @@ -44,7 +44,7 @@ namespace ot { /** - * This class implements the base class for an `AnnounceSender` and `AnnoucneBeginSever`. + * This class implements the base class for an `AnnounceSender` and `AnnounceBeginSever`. * * This class provides APIs to schedule periodic transmission of MLE Announcement messages for a given number * transmissions per channel. diff --git a/src/core/thread/child_table.hpp b/src/core/thread/child_table.hpp index 2a6bc56c5..ee9534809 100644 --- a/src/core/thread/child_table.hpp +++ b/src/core/thread/child_table.hpp @@ -164,7 +164,7 @@ public: * @param[in] aInstance A reference to the OpenThread instance. * */ - explicit ChildTable(Instance &aIntsance); + explicit ChildTable(Instance &aInstance); /** * This method clears the child table. @@ -206,7 +206,7 @@ public: /** * This method searches the child table for a `Child` with a given RLOC16 also matching a given state filter. * - * @param[in] aRloc16 A RLCO16 address. + * @param[in] aRloc16 A RLOC16 address. * @param[in] aFilter A child state filter. * * @returns A pointer to the `Child` entry if one is found, or `NULL` otherwise. @@ -332,8 +332,8 @@ public: Child *GetChild(void) { return NULL; } }; - explicit ChildTable(Instance &aIntsance) - : InstanceLocator(aIntsance) + explicit ChildTable(Instance &aInstance) + : InstanceLocator(aInstance) { } void Clear(void) {} diff --git a/src/core/thread/mesh_forwarder.hpp b/src/core/thread/mesh_forwarder.hpp index a58ac2e5f..35eb38872 100644 --- a/src/core/thread/mesh_forwarder.hpp +++ b/src/core/thread/mesh_forwarder.hpp @@ -467,7 +467,7 @@ private: uint8_t & aPriority); FragmentPriorityEntry *FindFragmentPriorityEntry(uint16_t aTag, uint16_t aSrcRloc16); - FragmentPriorityEntry *GetUnusedFragementPriorityEntry(void); + FragmentPriorityEntry *GetUnusedFragmentPriorityEntry(void); otError GetDestinationRlocByServiceAloc(uint16_t aServiceAloc, uint16_t &aMeshDest); diff --git a/src/core/thread/mesh_forwarder_ftd.cpp b/src/core/thread/mesh_forwarder_ftd.cpp index c5331bcd3..6eda583ba 100644 --- a/src/core/thread/mesh_forwarder_ftd.cpp +++ b/src/core/thread/mesh_forwarder_ftd.cpp @@ -1055,7 +1055,7 @@ void MeshForwarder::UpdateFragmentPriority(Lowpan::FragmentHeader &aFragmentHead if (aFragmentHeader.GetDatagramOffset() == 0) { - VerifyOrExit((entry = GetUnusedFragementPriorityEntry()) != NULL); + VerifyOrExit((entry = GetUnusedFragmentPriorityEntry()) != NULL); entry->SetDatagramTag(aFragmentHeader.GetDatagramTag()); entry->SetSrcRloc16(aSrcRloc16); @@ -1099,7 +1099,7 @@ FragmentPriorityEntry *MeshForwarder::FindFragmentPriorityEntry(uint16_t aTag, u return (i >= OT_ARRAY_LENGTH(mFragmentEntries)) ? NULL : &mFragmentEntries[i]; } -FragmentPriorityEntry *MeshForwarder::GetUnusedFragementPriorityEntry(void) +FragmentPriorityEntry *MeshForwarder::GetUnusedFragmentPriorityEntry(void) { size_t i; diff --git a/src/core/thread/mle_router_ftd.hpp b/src/core/thread/mle_router_ftd.hpp index e7cb52f37..949684adb 100644 --- a/src/core/thread/mle_router_ftd.hpp +++ b/src/core/thread/mle_router_ftd.hpp @@ -497,7 +497,7 @@ public: static int ComparePartitions(bool aSingletonA, const LeaderDataTlv &aLeaderDataA, bool aSingletonB, - const LeaderDataTlv &aleaderDataB); + const LeaderDataTlv &aLeaderDataB); /** * This method checks if the destination is reachable. diff --git a/src/core/thread/thread_netif.cpp b/src/core/thread/thread_netif.cpp index 0d5cbe35c..beb850734 100644 --- a/src/core/thread/thread_netif.cpp +++ b/src/core/thread/thread_netif.cpp @@ -93,7 +93,7 @@ ThreadNetif::ThreadNetif(Instance &aInstance) #endif // OPENTHREAD_ENABLE_JOINER #if OPENTHREAD_ENABLE_JAM_DETECTION , mJamDetector(aInstance) -#endif // OPENTHREAD_ENABLE_JAM_DETECTTION +#endif // OPENTHREAD_ENABLE_JAM_DETECTION #if OPENTHREAD_FTD , mJoinerRouter(aInstance) , mLeader(aInstance) diff --git a/src/core/utils/channel_manager.cpp b/src/core/utils/channel_manager.cpp index f8f215b5f..db12028f1 100644 --- a/src/core/utils/channel_manager.cpp +++ b/src/core/utils/channel_manager.cpp @@ -364,7 +364,7 @@ exit: return error; } -bool ChannelManager::ShouldAttamptChannelChange(void) +bool ChannelManager::ShouldAttemptChannelChange(void) { uint16_t ccaFailureRate = GetInstance().Get().GetCcaFailureRate(); bool shouldAttempt = (ccaFailureRate >= kCcaFailureRateThreshold); @@ -386,7 +386,7 @@ otError ChannelManager::RequestChannelSelect(bool aSkipQualityCheck) VerifyOrExit(GetInstance().Get().GetRole() != OT_DEVICE_ROLE_DISABLED, error = OT_ERROR_INVALID_STATE); - VerifyOrExit(aSkipQualityCheck || ShouldAttamptChannelChange()); + VerifyOrExit(aSkipQualityCheck || ShouldAttemptChannelChange()); SuccessOrExit(error = FindBetterChannel(newChannel, newOccupancy)); diff --git a/src/core/utils/channel_manager.hpp b/src/core/utils/channel_manager.hpp index 8cb0c8514..972115932 100644 --- a/src/core/utils/channel_manager.hpp +++ b/src/core/utils/channel_manager.hpp @@ -155,7 +155,7 @@ public: * @retval OT_ERROR_NONE Channel selection finished successfully. * @retval OT_ERROR_NOT_FOUND Supported channels is empty, therefore could not select a channel. * @retval OT_ERROR_INVALID_STATE Thread is not enabled or not enough data to select new channel. - * @retval OT_ERROR_DISABLED_FEATURE `ChannelMonintor` feature is disabled by build-time configuration options. + * @retval OT_ERROR_DISABLED_FEATURE `ChannelMonitor` feature is disabled by build-time configuration options. * */ otError RequestChannelSelect(bool aSkipQualityCheck); @@ -279,7 +279,7 @@ private: #if OPENTHREAD_ENABLE_CHANNEL_MONITOR otError FindBetterChannel(uint8_t &aNewChannel, uint16_t &aOccupancy); - bool ShouldAttamptChannelChange(void); + bool ShouldAttemptChannelChange(void); #endif Mac::ChannelMask mSupportedChannelMask; diff --git a/src/core/utils/child_supervision.hpp b/src/core/utils/child_supervision.hpp index 98f8bc6f2..3cb9739df 100644 --- a/src/core/utils/child_supervision.hpp +++ b/src/core/utils/child_supervision.hpp @@ -242,7 +242,7 @@ public: * @param[in] aIsSecure TRUE to indicate that the received frame is secure, FALSE otherwise. * */ - void UpdateOnReceive(const Mac::Address &aSource, bool aIsSeucre); + void UpdateOnReceive(const Mac::Address &aSource, bool aIsSecure); private: enum diff --git a/src/ncp/ncp_buffer.cpp b/src/ncp/ncp_buffer.cpp index a631dd65f..764562019 100644 --- a/src/ncp/ncp_buffer.cpp +++ b/src/ncp/ncp_buffer.cpp @@ -432,7 +432,7 @@ otError NcpFrameBuffer::InFrameOverwrite(const WritePosition &aPosition, VerifyOrExit(aPosition.mSegmentHead == mWriteSegmentHead, error = OT_ERROR_INVALID_ARGS); - // Ensure the overwrite does not go beyond current sgement tail. + // Ensure the overwrite does not go beyond current segment tail. segmentLength = GetDistance(mWriteSegmentHead, mWriteSegmentTail, mWriteDirection); distance = GetDistance(mWriteSegmentHead, aPosition.mPosition, mWriteDirection); VerifyOrExit(distance + aDataBufferLength <= segmentLength, error = OT_ERROR_INVALID_ARGS); diff --git a/src/ncp/ncp_spi.hpp b/src/ncp/ncp_spi.hpp index 1fe6ae0bc..4d381a8db 100644 --- a/src/ncp/ncp_spi.hpp +++ b/src/ncp/ncp_spi.hpp @@ -84,7 +84,7 @@ public: /** * This method sets the "flag byte" field in the SPI frame header. * - * @param[in] aResetFalg The status of reset flag (TRUE to set the flag, FALSE to clear flag). + * @param[in] aResetFlag The status of reset flag (TRUE to set the flag, FALSE to clear flag). * */ void SetHeaderFlagByte(bool aResetFlag) { mBuffer[kIndexFlagByte] = kFlagPattern | (aResetFlag ? kFlagReset : 0); } diff --git a/src/ncp/spinel_encoder.hpp b/src/ncp/spinel_encoder.hpp index b5652c921..dad009cbf 100644 --- a/src/ncp/spinel_encoder.hpp +++ b/src/ncp/spinel_encoder.hpp @@ -129,7 +129,7 @@ public: * behavior is undefined. * * This method moves the write position back to saved position by `BeginFrame()` and replaces the property key - * `SPINEL_PORP_LAST_STATUS` and writes the given spinel status error. + * `SPINEL_PROP_LAST_STATUS` and writes the given spinel status error. * * @param[in] aStatus Spinel error status * diff --git a/src/posix/platform/hdlc_interface.hpp b/src/posix/platform/hdlc_interface.hpp index 84024a1a8..9f0613355 100644 --- a/src/posix/platform/hdlc_interface.hpp +++ b/src/posix/platform/hdlc_interface.hpp @@ -73,7 +73,7 @@ public: /** * This callback is invoked to notify owner/user of `HdlcInterface` of a received (and decoded) frame. * - * The newly received frame is available in `RxFrameBuffer` from `HdclInterface::GetRxFrameBuffer()`. The + * The newly received frame is available in `RxFrameBuffer` from `HdlcInterface::GetRxFrameBuffer()`. The * user can read and process the frame. The callback is expected to either discard the new frame using * `RxFrameBuffer::DiscardFrame()` or save the frame using `RxFrameBuffer::SaveFrame()` to be read and * processed later.