summaryrefslogtreecommitdiffstats
path: root/perl-install/crypto.pm
diff options
context:
space:
mode:
authorPascal Rigaux <pixel@mandriva.com>2003-01-07 12:21:45 +0000
committerPascal Rigaux <pixel@mandriva.com>2003-01-07 12:21:45 +0000
commit7b92031bf036d2f3cda239fc79967c5c0f14c19d (patch)
treead20ea9600c896abc3fe529352dc061f09a6c813 /perl-install/crypto.pm
parent0d57018d039ab38a6d992bfa7dab7ff64b51cd44 (diff)
downloaddrakx-7b92031bf036d2f3cda239fc79967c5c0f14c19d.tar
drakx-7b92031bf036d2f3cda239fc79967c5c0f14c19d.tar.gz
drakx-7b92031bf036d2f3cda239fc79967c5c0f14c19d.tar.bz2
drakx-7b92031bf036d2f3cda239fc79967c5c0f14c19d.tar.xz
drakx-7b92031bf036d2f3cda239fc79967c5c0f14c19d.zip
cleanup and add a comment (!)
Diffstat (limited to 'perl-install/crypto.pm')
-rw-r--r--perl-install/crypto.pm5
1 files changed, 2 insertions, 3 deletions
diff --git a/perl-install/crypto.pm b/perl-install/crypto.pm
index 36912dc69..56af9893c 100644
--- a/perl-install/crypto.pm
+++ b/perl-install/crypto.pm
@@ -89,10 +89,9 @@ sub bestMirror {
++$value;
}
}
- my ($min_value) = sort { $a <=> $b } values %mirror2value;
+ my $min_value = min(values %mirror2value);
- my @possible = grep { $mirror2value{$_} == $min_value } keys %mirror2value;
- push @possible, grep { $mirror2value{$_} == $min_value } keys %mirror2value;
+ my @possible = (grep { $mirror2value{$_} == $min_value } keys %mirror2value) x 2; #- increase probability
push @possible, grep { $mirror2value{$_} == 1 + $min_value } keys %mirror2value;
$possible[rand @possible];