unused variables found via use-def analysis (plus an indentation micro-nit)

This commit is contained in:
Vern Paxson 2020-04-25 18:06:47 -07:00
parent 6e2cd3ae44
commit fe46ef06a0
5 changed files with 6 additions and 7 deletions

View file

@ -70,11 +70,10 @@ const ip_addr_regex = ipv4_addr_regex | ipv6_addr_regex;
## Returns: T if every element is between 0 and 255, inclusive, else F.
function has_valid_octets(octets: string_vec): bool
{
local num = 0;
for ( i in octets )
{
num = to_count(octets[i]);
if ( num < 0 || 255 < num )
local num = to_count(octets[i]);
if ( 255 < num )
return F;
}
return T;