Minor tweaks to the IPAddrs module

This commit is contained in:
Tom Eastep 2010-08-11 11:46:26 -07:00
parent 0234564a1b
commit 965ad7ced1
3 changed files with 4 additions and 4 deletions

View File

@ -124,8 +124,8 @@ sub valid_4address( $ ) {
my @address = split /\./, $address;
return 0 unless @address == 4;
for my $a ( @address ) {
return 0 unless $a =~ /^\d+$/ && $a < 256;
for ( @address ) {
return 0 unless /^\d+$/ && $_ < 256;
}
1;
@ -158,8 +158,8 @@ sub decodeaddr( $ ) {
my $result = shift @address;
for my $a ( @address ) {
$result = ( $result << 8 ) | $a;
for ( @address ) {
$result = ( $result << 8 ) | $_;
}
$result;

Binary file not shown.

Binary file not shown.

Before

Width:  |  Height:  |  Size: 101 KiB

After

Width:  |  Height:  |  Size: 101 KiB