diff options
author | Thierry Vignaud <tvignaud@mandriva.org> | 2003-01-13 08:47:24 +0000 |
---|---|---|
committer | Thierry Vignaud <tvignaud@mandriva.org> | 2003-01-13 08:47:24 +0000 |
commit | b63a95340228bcd0eb70eeff5da8c3afe4e4598a (patch) | |
tree | a4c83c29cadac80b1a6dc345ed783982ce8b126f /perl-install/printer/printerdrake.pm | |
parent | a9289deff78588454f1dd9471f116622bcb23b08 (diff) | |
download | drakx-b63a95340228bcd0eb70eeff5da8c3afe4e4598a.tar drakx-b63a95340228bcd0eb70eeff5da8c3afe4e4598a.tar.gz drakx-b63a95340228bcd0eb70eeff5da8c3afe4e4598a.tar.bz2 drakx-b63a95340228bcd0eb70eeff5da8c3afe4e4598a.tar.xz drakx-b63a95340228bcd0eb70eeff5da8c3afe4e4598a.zip |
setup_local_autoscan() : simplify loop of loop
and optimize away useless $alreadyfound
Diffstat (limited to 'perl-install/printer/printerdrake.pm')
-rw-r--r-- | perl-install/printer/printerdrake.pm | 9 |
1 files changed, 2 insertions, 7 deletions
diff --git a/perl-install/printer/printerdrake.pm b/perl-install/printer/printerdrake.pm index a7273d13c..04464b1bd 100644 --- a/perl-install/printer/printerdrake.pm +++ b/perl-install/printer/printerdrake.pm @@ -585,16 +585,11 @@ sub setup_local_autoscan { my @port; if ($::expert) { @port = detect_devices::whatPrinterPort(); - foreach my $q (@port) { + LOOP: foreach my $q (@port) { if (@str) { - my $alreadyfound = 0; foreach my $p (@autodetected) { - if ($p->{port} eq $q) { - $alreadyfound = 1; - last; - } + last LOOP if $p->{port} eq $q; } - next if $alreadyfound; } my $menustr; if ($q =~ m!^/dev/lp(\d+)$!) { |