mirror of
https://github.com/espressif/openthread.git
synced 2026-09-30 04:47:42 +00:00
[ip6] adhere to style guide for var declarations in HandleDatagram() (#13320)
This is a small style guide fix in `Ip6::HandleDatagram()`, ensuring all scoped stack variable declarations are placed together at the top of the enclosing scope in which they are used.
This commit is contained in:
@@ -1267,15 +1267,15 @@ exit:
|
|||||||
|
|
||||||
Error Ip6::HandleDatagram(OwnedPtr<Message> aMessagePtr, bool aIsReassembled, uint8_t aRecursionDepth)
|
Error Ip6::HandleDatagram(OwnedPtr<Message> aMessagePtr, bool aIsReassembled, uint8_t aRecursionDepth)
|
||||||
{
|
{
|
||||||
Error error;
|
Error error;
|
||||||
Header header;
|
Header header;
|
||||||
|
|
||||||
VerifyOrExit(aRecursionDepth <= kMaxRecursionDepth, error = kErrorDrop);
|
|
||||||
bool receive;
|
bool receive;
|
||||||
bool forwardThread;
|
bool forwardThread;
|
||||||
bool forwardHost;
|
bool forwardHost;
|
||||||
uint8_t nextHeader;
|
uint8_t nextHeader;
|
||||||
|
|
||||||
|
VerifyOrExit(aRecursionDepth <= kMaxRecursionDepth, error = kErrorDrop);
|
||||||
|
|
||||||
SuccessOrExit(error = header.ParseFrom(*aMessagePtr));
|
SuccessOrExit(error = header.ParseFrom(*aMessagePtr));
|
||||||
|
|
||||||
if (!aMessagePtr->IsOriginHostTrusted())
|
if (!aMessagePtr->IsOriginHostTrusted())
|
||||||
|
|||||||
Reference in New Issue
Block a user