Make validate_address() easier to read

git-svn-id: https://shorewall.svn.sourceforge.net/svnroot/shorewall/trunk@6361 fbd18981-670d-0410-9b5c-8dc0c1a9a2bb
This commit is contained in:
teastep 2007-05-15 20:02:42 +00:00
parent 0040a99a44
commit b0122f9696

View File

@ -65,8 +65,10 @@ sub valid_address( $ ) {
}
sub validate_address( $ ) {
unless ( valid_address $_[0] ) {
fatal_error "Unknown Host ($_[0])" unless defined gethostbyname $_[0];
my $addr = $_[0];
unless ( valid_address $addr ) {
fatal_error "Unknown Host ($addr)" unless defined gethostbyname $addr;
}
}