Fix clang-tidy modernize-loop-convert findings

This commit is contained in:
Tim Wojtulewicz 2025-05-13 10:06:13 -07:00
parent 49b803c0a8
commit f3588657bf
56 changed files with 452 additions and 542 deletions

View file

@ -738,8 +738,8 @@ IPAddr SubNetVal::Mask() const {
// We need to special-case a mask width of zero, since
// the compiler doesn't guarantee that 1 << 32 yields 0.
uint32_t m[4];
for ( unsigned int i = 0; i < 4; ++i )
m[i] = 0;
for ( uint32_t& digit : m )
digit = 0;
IPAddr rval(IPv6, m, IPAddr::Host);
return rval;
}