[style] fix typos (#3451)

This commit is contained in:
Jonathan Hui
2019-01-11 09:03:10 -08:00
committed by GitHub
parent f5c49e2dd0
commit 1056c7c93a
34 changed files with 60 additions and 60 deletions
+1 -1
View File
@@ -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]);
}
+1 -1
View File
@@ -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))
+1 -1
View File
@@ -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]);
}
+1 -1
View File
@@ -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]);
}
+1 -1
View File
@@ -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]);
}
+1 -1
View File
@@ -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]);
}
+1 -1
View File
@@ -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;
+1 -1
View File
@@ -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);
+1 -1
View File
@@ -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]);
}
+2 -2
View File
@@ -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 <psk> <client id>' "
": 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 <servers ipv6 addr> (port)' "
": start dtls session with a server\r\n");
mInterpreter.mServer->OutputFormat(">'coaps get' 'coaps put' 'coaps post' 'coaps delete' "
+2 -2
View File
@@ -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
+1 -1
View File
@@ -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:
/**
+1 -1
View File
@@ -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:
/**
+1 -1
View File
@@ -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,
+2 -2
View File
@@ -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).
+10 -10
View File
@@ -474,15 +474,15 @@ void Commissioner::HandleMgmtCommissionerGetResponse(void * aConte
const otMessageInfo *aMessageInfo,
otError aResult)
{
static_cast<Commissioner *>(aContext)->HandleMgmtCommissisonerGetResponse(
static_cast<Commissioner *>(aContext)->HandleMgmtCommissionerGetResponse(
static_cast<Coap::Header *>(aHeader), static_cast<Message *>(aMessage),
static_cast<const Ip6::MessageInfo *>(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<Commissioner *>(aContext)->HandleMgmtCommissisonerSetResponse(
static_cast<Commissioner *>(aContext)->HandleMgmtCommissionerSetResponse(
static_cast<Coap::Header *>(aHeader), static_cast<Message *>(aMessage),
static_cast<const Ip6::MessageInfo *>(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);
+9 -9
View File
@@ -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,
+1 -1
View File
@@ -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;
+1 -1
View File
@@ -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
+1 -1
View File
@@ -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
};
/**
+1 -1
View File
@@ -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.
*
+1 -1
View File
@@ -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.
+4 -4
View File
@@ -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) {}
+1 -1
View File
@@ -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);
+2 -2
View File
@@ -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;
+1 -1
View File
@@ -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.
+1 -1
View File
@@ -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)
+2 -2
View File
@@ -364,7 +364,7 @@ exit:
return error;
}
bool ChannelManager::ShouldAttamptChannelChange(void)
bool ChannelManager::ShouldAttemptChannelChange(void)
{
uint16_t ccaFailureRate = GetInstance().Get<Mac::Mac>().GetCcaFailureRate();
bool shouldAttempt = (ccaFailureRate >= kCcaFailureRateThreshold);
@@ -386,7 +386,7 @@ otError ChannelManager::RequestChannelSelect(bool aSkipQualityCheck)
VerifyOrExit(GetInstance().Get<Mle::Mle>().GetRole() != OT_DEVICE_ROLE_DISABLED, error = OT_ERROR_INVALID_STATE);
VerifyOrExit(aSkipQualityCheck || ShouldAttamptChannelChange());
VerifyOrExit(aSkipQualityCheck || ShouldAttemptChannelChange());
SuccessOrExit(error = FindBetterChannel(newChannel, newOccupancy));
+2 -2
View File
@@ -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;
+1 -1
View File
@@ -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
+1 -1
View File
@@ -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);
+1 -1
View File
@@ -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); }
+1 -1
View File
@@ -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
*
+1 -1
View File
@@ -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.