Skip to content

Commit

Permalink
headers_check: fix perl warnings
Browse files Browse the repository at this point in the history
According to PBP; best way practice is to use local reference for file
handle and three argument open. Also perl prototypes are a mistake.

Signed-off-by: Stephen Hemminger <[email protected]>
Acked-by: WANG Cong <[email protected]>
Cc: Michal Marek <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Michal Marek <[email protected]>
  • Loading branch information
Stephen Hemminger authored and michal42 committed Mar 7, 2010
1 parent 91416cf commit dbbe33e
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions scripts/headers_check.pl
Original file line number Diff line number Diff line change
Expand Up @@ -28,19 +28,20 @@
my $filename;

foreach my $file (@files) {
local *FH;
$filename = $file;
open(FH, "<$filename") or die "$filename: $!\n";

open(my $fh, '<', $filename)
or die "$filename: $!\n";
$lineno = 0;
while ($line = <FH>) {
while ($line = <$fh>) {
$lineno++;
&check_include();
&check_asm_types();
&check_sizetypes();
&check_declarations();
# Dropped for now. Too much noise &check_config();
}
close FH;
close $fh;
}
exit $ret;

Expand Down Expand Up @@ -78,7 +79,7 @@ sub check_config
}

my $linux_asm_types;
sub check_asm_types()
sub check_asm_types
{
if ($filename =~ /types.h|int-l64.h|int-ll64.h/o) {
return;
Expand Down

0 comments on commit dbbe33e

Please sign in to comment.