[br-tracker] initialize aMinAge to uint32_t::kMax (#11963)

In `NetDataPeerBrTracker::CountPeerBrs()` method, the `aMinAge`
output parameter is a `uint32_t` but it was incorrectly
initialized to `NumericLimits<uint16_t>::kMax`.

This change corrects the initialization to use the
`NumericLimits<uint32_t>::kMax` to ensure the minimum age
calculation functions correctly over the full 32-bit range.
This commit is contained in:
Abtin Keshavarzian
2025-09-24 18:32:18 -07:00
committed by GitHub
parent a5c36a685a
commit fb6fa2002a
+1 -1
View File
@@ -49,7 +49,7 @@ uint16_t NetDataPeerBrTracker::CountPeerBrs(uint32_t &aMinAge) const
uint32_t uptime = Get<Uptime>().GetUptimeInSeconds();
uint16_t count = 0;
aMinAge = NumericLimits<uint16_t>::kMax;
aMinAge = NumericLimits<uint32_t>::kMax;
for (const PeerBr &peerBr : mPeerBrs)
{