assemble: perlcritic: avoid unamed literal and two argument open

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
This commit is contained in:
Thomas Lamprecht 2021-02-10 09:56:30 +01:00
parent bb4be6ebcf
commit f75a8ffbf7

View File

@ -304,8 +304,8 @@ my $fwdone = {};
my $error = 0; my $error = 0;
open(TMP, $fwlist); open(my $fd, '<', $fwlist);
while(defined(my $line = <TMP>)) { while(defined(my $line = <$fd>)) {
chomp $line; chomp $line;
my ($fw, $mod) = split(/\s+/, $line, 2); my ($fw, $mod) = split(/\s+/, $line, 2);
@ -398,6 +398,6 @@ while(defined(my $line = <TMP>)) {
$error++; $error++;
next; next;
} }
close(TMP); close($fd);
exit($error); exit($error);