mirror of
https://github.com/espressif/openthread.git
synced 2026-08-22 02:19:52 +00:00
[routing-manager] use sizeof explicit type Ip6::Icmp::Header (#7693)
While using sizeof(*icmp6Header) before it is initialized to something is not wrong, it is possible this will be flagged by some code checker tools. Lets check using direct type.
This commit is contained in:
@@ -340,7 +340,7 @@ void RoutingManager::RecvIcmp6Message(uint32_t aInfraIfIndex,
|
||||
|
||||
VerifyOrExit(IsInitialized() && mIsRunning, error = kErrorDrop);
|
||||
VerifyOrExit(aInfraIfIndex == mInfraIfIndex, error = kErrorDrop);
|
||||
VerifyOrExit(aBuffer != nullptr && aBufferLength >= sizeof(*icmp6Header), error = kErrorParse);
|
||||
VerifyOrExit(aBuffer != nullptr && aBufferLength >= sizeof(Ip6::Icmp::Header), error = kErrorParse);
|
||||
|
||||
icmp6Header = reinterpret_cast<const Ip6::Icmp::Header *>(aBuffer);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user