mirror of
https://github.com/espressif/openthread.git
synced 2026-08-04 01:47:47 +00:00
[ip6] fix static code analysis errors (#7422)
This commit fixes issues found during static code analysis.
This commit is contained in:
@@ -372,7 +372,7 @@ void DatasetManager::HandleGet(const Coap::Message &aMessage, const Ip6::Message
|
||||
|
||||
while (offset < aMessage.GetLength())
|
||||
{
|
||||
IgnoreError(aMessage.Read(offset, tlv));
|
||||
SuccessOrExit(aMessage.Read(offset, tlv));
|
||||
|
||||
if (tlv.GetType() == Tlv::kGet)
|
||||
{
|
||||
|
||||
@@ -262,7 +262,7 @@ Error Ip6::InsertMplOption(Message &aMessage, Header &aHeader, MessageInfo &aMes
|
||||
OptionMpl mplOption;
|
||||
|
||||
// read existing hop-by-hop option header
|
||||
IgnoreError(aMessage.Read(0, hbh));
|
||||
SuccessOrExit(error = aMessage.Read(0, hbh));
|
||||
hbhLength = (hbh.GetLength() + 1) * 8;
|
||||
|
||||
VerifyOrExit(hbhLength <= aHeader.GetPayloadLength(), error = kErrorParse);
|
||||
|
||||
Reference in New Issue
Block a user