forked from extern/shorewall_code
Small optimization in lookup_provider()
This commit is contained in:
parent
64fd1167d1
commit
3483e8052a
@ -769,11 +769,8 @@ sub lookup_provider( $ ) {
|
||||
|
||||
my $provider_number = numeric_value $provider;
|
||||
|
||||
for ( keys %providers ) {
|
||||
if ( $providers{$_}{number} == $provider_number ) {
|
||||
$providerref = $providers{$_};
|
||||
last;
|
||||
}
|
||||
for ( values %providers ) {
|
||||
$providerref = $_, last if $_->{number} == $provider_number;
|
||||
}
|
||||
|
||||
fatal_error "Unknown provider ($provider)" unless $providerref;
|
||||
|
Loading…
Reference in New Issue
Block a user