[mle] remove redundant call to RouterTable::GetRouter (#4465)

This commit is contained in:
Jonathan Hui
2020-01-12 22:09:22 -08:00
committed by GitHub
parent 4b0822fa8e
commit 1a5c687810
+1 -1
View File
@@ -3447,7 +3447,7 @@ uint8_t MleRouter::GetCost(uint16_t aRloc16)
VerifyOrExit(router != NULL && mRouterTable.GetRouter(router->GetNextHop()) != NULL);
routeCost = GetRouteCost(aRloc16) + GetLinkCost(mRouterTable.GetRouter(routerId)->GetNextHop());
routeCost = GetRouteCost(aRloc16) + GetLinkCost(router->GetNextHop());
if (cost > routeCost)
{