Small optimization in lookup_provider()

This commit is contained in:
Tom Eastep 2009-06-16 15:52:38 -07:00
parent 64fd1167d1
commit 3483e8052a

View File

@ -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;