Skip to content

Commit

Permalink
[doc] fix typos in comments (openthread#10664)
Browse files Browse the repository at this point in the history
Done by `script/code-spell` with some manual fixes.
  • Loading branch information
superwhd authored Sep 2, 2024
1 parent 98d1aed commit e19c775
Show file tree
Hide file tree
Showing 16 changed files with 20 additions and 17 deletions.
5 changes: 4 additions & 1 deletion .code-spell-ignore
Original file line number Diff line number Diff line change
@@ -1,10 +1,12 @@
aafter
aanother
acount
addrss
afile
aline
anumber
alocator
ans
anumber
aother
aparent
apending
Expand All @@ -14,6 +16,7 @@ ect
intialize
nd
ot
re-use
shashes
ue
unknwn
Expand Down
2 changes: 1 addition & 1 deletion include/openthread/ble_secure.h
Original file line number Diff line number Diff line change
Expand Up @@ -334,7 +334,7 @@ otError otBleSecureConnect(otInstance *aInstance);
void otBleSecureDisconnect(otInstance *aInstance);

/**
* Indicates whether or not the TLS session is active (connected or conneting).
* Indicates whether or not the TLS session is active (connected or connecting).
*
* @param[in] aInstance A pointer to an OpenThread instance.
*
Expand Down
2 changes: 1 addition & 1 deletion include/openthread/instance.h
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ extern "C" {
* @note This number versions both OpenThread platform and user APIs.
*
*/
#define OPENTHREAD_API_VERSION (438)
#define OPENTHREAD_API_VERSION (439)

/**
* @addtogroup api-instance
Expand Down
2 changes: 1 addition & 1 deletion include/openthread/platform/multipan.h
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@
* Currently we support two types of multipan RCP:
* - Full multipan: RCP operates in parallel on both networks (for example using more than one transceiver)
* - Switching RCP: RCP can communicate only with one network at a time and requires network switching mechanism.
* Switching can be automatic (for example time based, radio sleep based) or manually contolled by
* Switching can be automatic (for example time based, radio sleep based) or manually controlled by
* the host.
*
* Full multipan RCP and Automatic Switching RCP do not require any special care from the host side.
Expand Down
2 changes: 1 addition & 1 deletion src/core/coap/coap.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ class TxParameters : public otCoapTxParameters

public:
/**
* Coverts a pointer to `otCoapTxParameters` to `Coap::TxParamters`
* Converts a pointer to `otCoapTxParameters` to `Coap::TxParamters`
*
* If the pointer is `nullptr`, the default parameters are used instead.
*
Expand Down
2 changes: 1 addition & 1 deletion src/core/common/heap_string.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ namespace Heap {
/**
* Represents a heap allocated string.
*
* The buffer to store the string is allocated from heap and is manged by the `Heap::String` class itself, e.g., it may
* The buffer to store the string is allocated from heap and is managed by the `Heap::String` class itself, e.g., it may
* be reused and/or freed and reallocated when the string is set. The `Heap::String` destructor will always free the
* allocated buffer.
*
Expand Down
2 changes: 1 addition & 1 deletion src/core/common/string.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -352,7 +352,7 @@ Error ParseDigit(char aDigitChar, uint8_t &aValue);
Error ParseHexDigit(char aHexChar, uint8_t &aValue);

/**
* Coverts a boolean to "yes" or "no" string.
* Converts a boolean to "yes" or "no" string.
*
* @param[in] aBool A boolean value to convert.
*
Expand Down
2 changes: 1 addition & 1 deletion src/core/radio/ble_secure.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,7 @@ class BleSecure : public InstanceLocator, private NonCopyable
void Disconnect(void);

/**
* Indicates whether or not the TLS session is active (connected or conneting).
* Indicates whether or not the TLS session is active (connected or connecting).
*
* @retval TRUE If TLS session is active.
* @retval FALSE If TLS session is not active.
Expand Down
2 changes: 1 addition & 1 deletion src/core/radio/radio.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ static constexpr uint64_t kMaxCslTimeout = OPENTHREAD_CONFIG_MAC_CSL_MAX_TIMEOUT
* Implements the radio statistics logic.
*
* The radio statistics are the time when the radio in TX/RX/radio state.
* Since this class collects these statistics from pure software level and no platform API is involved, a simplied
* Since this class collects these statistics from pure software level and no platform API is involved, a simplified
* model is used to calculate the time of different radio states. The data may not be very accurate, but it's
* sufficient to provide a general understanding of the proportion of time a device is in different radio states.
*
Expand Down
2 changes: 1 addition & 1 deletion src/core/thread/link_metrics.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -270,7 +270,7 @@ class Initiator : public InstanceLocator, private NonCopyable
/**
* Implements the Thread Link Metrics Subject.
*
* The Subject reponds queries with reports, handles Link Metrics Management Requests and Link Probe Messages.
* The Subject responds queries with reports, handles Link Metrics Management Requests and Link Probe Messages.
*
*/
class Subject : public InstanceLocator, private NonCopyable
Expand Down
4 changes: 2 additions & 2 deletions src/core/thread/network_data_types.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,7 @@ typedef Array<uint16_t, kMaxRlocs> Rlocs;
inline bool IsRoutePreferenceValid(int8_t aPref) { return Preference::IsValid(aPref); }

/**
* Coverts a route preference to a 2-bit unsigned value.
* Converts a route preference to a 2-bit unsigned value.
*
* The @p aPref MUST be valid (value from `RoutePreference` enumeration), or the behavior is undefined.
*
Expand All @@ -165,7 +165,7 @@ inline bool IsRoutePreferenceValid(int8_t aPref) { return Preference::IsValid(aP
inline uint8_t RoutePreferenceToValue(int8_t aPref) { return Preference::To2BitUint(aPref); }

/**
* Coverts a 2-bit unsigned value to a route preference.
* Converts a 2-bit unsigned value to a route preference.
*
* @param[in] aValue The 2-bit unsigned value to convert from. Note that only the first two bits of @p aValue
* are used and the rest of bits are ignored.
Expand Down
2 changes: 1 addition & 1 deletion src/lib/spinel/radio_spinel.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -172,7 +172,7 @@ class RadioSpinel : private Logger
* directly do a hardware reset.
* @param[in] aSpinelDriver A pointer to the spinel driver instance that this object depends on.
* @param[in] aRequiredRadioCaps The required radio capabilities. RadioSpinel will check if RCP has
* the required capabilities during initiailization.
* the required capabilities during initialization.
* @param[in] aEnableRcpTimeSync TRUE to enable RCP time sync, FALSE to not enable.
*
*/
Expand Down
2 changes: 1 addition & 1 deletion src/lib/spinel/spinel.h
Original file line number Diff line number Diff line change
Expand Up @@ -522,7 +522,7 @@ enum

/// Generic failure to associate with other peers.
/**
* This status error should not be used by implementors if
* This status error should not be used by implementers if
* enough information is available to determine that one of the
* later join failure status codes would be more accurate.
*
Expand Down
2 changes: 1 addition & 1 deletion src/posix/platform/netif.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -226,7 +226,7 @@ ot::Posix::Resolver gResolver;
#else
// on some platforms (Linux, but others might be made to work), we do not get information about multicast
// group joining via AF_NETLINK or AF_ROUTE sockets. on those platform, we must listen for IPv6 ICMP
// MLDv2 messages to know when mulicast memberships change
// MLDv2 messages to know when multicast memberships change
// https://stackoverflow.com/questions/37346289/using-netlink-is-it-possible-to-listen-whenever-multicast-group-membership-is-ch
#define OPENTHREAD_POSIX_USE_MLD_MONITOR 1
#endif // defined(RTM_NEWMADDR) || defined(__NetBSD__)
Expand Down
2 changes: 1 addition & 1 deletion tests/scripts/thread-cert/command.py
Original file line number Diff line number Diff line change
Expand Up @@ -559,7 +559,7 @@ def check_compressed_address_registration_tlv(command_msg, cid, iid, cid_present
command_msg (MleMessage) : The Mle message to check.
cid (int): The context id of the domain prefix.
iid (string): The Interface Identifier.
cid_present_once(boolean): True if cid entry should apprear only once in AR Tlv.
cid_present_once(boolean): True if cid entry should appear only once in AR Tlv.
False otherwise.
'''
found = False
Expand Down
2 changes: 1 addition & 1 deletion tests/scripts/thread-cert/test_crypto.py
Original file line number Diff line number Diff line change
Expand Up @@ -195,7 +195,7 @@ def test_should_encrypt_and_decrypt_random_data_content_when_proper_methods_are_


class TestCryptoMaterialCreator(unittest.TestCase):
""" Key generaion was described in Thread specification.
""" Key generation was described in Thread specification.
Read more: Thread 1.1.0 Specification Candidate Final - 7.1.4 Key Generation
Expand Down

0 comments on commit e19c775

Please sign in to comment.