mirror of
https://github.com/zeek/zeek.git
synced 2025-10-16 21:48:21 +00:00
Fix clang-tidy modernize-loop-convert findings
This commit is contained in:
parent
49b803c0a8
commit
f3588657bf
56 changed files with 452 additions and 542 deletions
|
@ -205,8 +205,8 @@ bool IPAddr::ConvertString(const char* s, in6_addr* result) {
|
|||
if ( s[n] != '\0' )
|
||||
return false;
|
||||
|
||||
for ( auto i = 0; i < 4; ++i )
|
||||
if ( a[i] < 0 || a[i] > 255 )
|
||||
for ( int num : a )
|
||||
if ( num < 0 || num > 255 )
|
||||
return false;
|
||||
|
||||
uint32_t addr = (a[0] << 24) | (a[1] << 16) | (a[2] << 8) | a[3];
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue