mirror of
https://github.com/espressif/openthread.git
synced 2026-07-09 05:40:27 +00:00
[mac] clean up extended address usage (#2413)
- Replace `memcmp` with `==` and `!=` operators. - Replace `memcpy` with `=` assignment. - Change pointers to reference where applicable.
This commit is contained in:
@@ -357,8 +357,7 @@ otError otThreadGetParentInfo(otInstance *aInstance, otRouterInfo *aParentInfo)
|
||||
VerifyOrExit(aParentInfo != NULL, error = OT_ERROR_INVALID_ARGS);
|
||||
|
||||
parent = instance.GetThreadNetif().GetMle().GetParent();
|
||||
memcpy(aParentInfo->mExtAddress.m8, &parent->GetExtAddress(), sizeof(aParentInfo->mExtAddress));
|
||||
|
||||
aParentInfo->mExtAddress = parent->GetExtAddress();
|
||||
aParentInfo->mRloc16 = parent->GetRloc16();
|
||||
aParentInfo->mRouterId = Mle::Mle::GetRouterId(parent->GetRloc16());
|
||||
aParentInfo->mNextHop = parent->GetNextHop();
|
||||
|
||||
Reference in New Issue
Block a user