markup_oops: fix perlcritic warnings
PATCH 1/2 markup_oops: fix perlcritic warnings
From: Stephen Hemminger <[email protected]>
Turn on strict checking.
Use local file handles and 3 argument open.
Signed-off-by Stephen Hemminger <[email protected]>
Acked-by WANG Cong <[email protected]>
Cc Arjan van de Ven <[email protected]>
Cc Michal Marek <[email protected]>
Signed-off-by Andrew Morton <[email protected]>
---
scripts/markup_oops.pl | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-)
scripts/markup_oops.pl renamed from scripts/markup_oops.pl~markup_oops-fix-perlcritic-warnings +4 -2
@@ -1,5 +1,7 @@ #!/usr/bin/perl +use strict; + use File::Basename; use Math::BigInt; use Getopt::Long;
@@ -126,7 +128,7 @@ sub process_x86_regs $clobber = ""; } - foreach $reg (keys(%regs)) { + foreach my $reg (keys(%regs)) { my $clobberprime = reg_name($clobber); my $lastwordprime = reg_name($lastword); my $val = $regs{$reg};
@@ -263,7 +265,7 @@ while (<FILE>) { } } -close(FILE); +close($file); if ($counter == 0) { print "No matching code found \n";
_