remove unreachable condition (#100)

This commit is contained in:
rongli
2016-06-02 08:51:43 -07:00
committed by Jonathan Hui
parent d1597b4bc2
commit 1d5dae8578
+1 -9
View File
@@ -1252,15 +1252,7 @@ void MleRouter::UpdateRoutes(const RouteTlv &aRoute, uint8_t aRouterId)
}
}
if (i != aRouterId && cost == 0 && mRouters[i].mNextHop == aRouterId)
{
// route nexthop is neighbor, but neighbor no longer has route
ResetAdvertiseInterval();
mRouters[i].mNextHop = kMaxRouterId;
mRouters[i].mCost = 0;
mRouters[i].mLastHeard = Timer::GetNow();
}
else if (mRouters[i].mNextHop == kMaxRouterId || mRouters[i].mNextHop == aRouterId)
if (mRouters[i].mNextHop == kMaxRouterId || mRouters[i].mNextHop == aRouterId)
{
// route has no nexthop or nexthop is neighbor
newCost = cost + GetLinkCost(aRouterId);