diff --git a/src/core/common/tlvs.cpp b/src/core/common/tlvs.cpp index c045db6cd..4c5d1ed93 100644 --- a/src/core/common/tlvs.cpp +++ b/src/core/common/tlvs.cpp @@ -180,7 +180,7 @@ template Error Tlv::ReadUintTlv(const Message &aMessage, uin { Error error; - SuccessOrExit(error = ReadTlv(aMessage, aOffset, &aValue, sizeof(aValue))); + SuccessOrExit(error = ReadTlvValue(aMessage, aOffset, &aValue, sizeof(aValue))); aValue = Encoding::BigEndian::HostSwap(aValue); exit: @@ -192,7 +192,7 @@ template Error Tlv::ReadUintTlv(const Message &aMessage, uint16_t aOffs template Error Tlv::ReadUintTlv(const Message &aMessage, uint16_t aOffset, uint16_t &aValue); template Error Tlv::ReadUintTlv(const Message &aMessage, uint16_t aOffset, uint32_t &aValue); -Error Tlv::ReadTlv(const Message &aMessage, uint16_t aOffset, void *aValue, uint8_t aMinLength) +Error Tlv::ReadTlvValue(const Message &aMessage, uint16_t aOffset, void *aValue, uint8_t aMinLength) { Error error = kErrorNone; Tlv tlv; diff --git a/src/core/common/tlvs.hpp b/src/core/common/tlvs.hpp index 4dd55f4d6..81158a25a 100644 --- a/src/core/common/tlvs.hpp +++ b/src/core/common/tlvs.hpp @@ -175,7 +175,7 @@ public: Error AppendTo(Message &aMessage) const; /** - * This static method reads a TLV in a message at a given offset expecting a minimum length for the value. + * This static method reads a TLV's value in a message at a given offset expecting a minimum length for the value. * * @param[in] aMessage The message to read from. * @param[in] aOffset The offset into the message pointing to the start of the TLV. @@ -186,7 +186,7 @@ public: * @retval kErrorParse The TLV was not well-formed and could not be parsed. * */ - static Error ReadTlv(const Message &aMessage, uint16_t aOffset, void *aValue, uint8_t aMinLength); + static Error ReadTlvValue(const Message &aMessage, uint16_t aOffset, void *aValue, uint8_t aMinLength); /** * This static method reads a simple TLV with a single non-integral value in a message at a given offset. @@ -204,7 +204,7 @@ public: template static Error Read(const Message &aMessage, uint16_t aOffset, typename SimpleTlvType::ValueType &aValue) { - return ReadTlv(aMessage, aOffset, &aValue, sizeof(aValue)); + return ReadTlvValue(aMessage, aOffset, &aValue, sizeof(aValue)); } /** diff --git a/src/core/thread/discover_scanner.cpp b/src/core/thread/discover_scanner.cpp index 448497b54..7b614eb63 100644 --- a/src/core/thread/discover_scanner.cpp +++ b/src/core/thread/discover_scanner.cpp @@ -358,7 +358,7 @@ void DiscoverScanner::HandleDiscoveryResponse(Mle::RxInfo &aRxInfo) const steeringData.Init(dataLength); - SuccessOrExit(error = Tlv::ReadTlv(aRxInfo.mMessage, offset, steeringData.GetData(), dataLength)); + SuccessOrExit(error = Tlv::ReadTlvValue(aRxInfo.mMessage, offset, steeringData.GetData(), dataLength)); if (mEnableFiltering) {