diff options
author | Stephen Hemminger <shemminger@vyatta.com> | 2010-02-22 15:17:24 -0800 |
---|---|---|
committer | Michal Marek <mmarek@suse.cz> | 2010-03-07 21:43:07 +0100 |
commit | dbbe33e99f41a6f07e61dbce455964112d8ac72b (patch) | |
tree | af4cf57227992778f253fdd495262328dd87ebfd /scripts | |
parent | 91416cfdf98bdbc828fd3e5ca7208beba5979d63 (diff) | |
download | kernel_goldelico_gta04-dbbe33e99f41a6f07e61dbce455964112d8ac72b.zip kernel_goldelico_gta04-dbbe33e99f41a6f07e61dbce455964112d8ac72b.tar.gz kernel_goldelico_gta04-dbbe33e99f41a6f07e61dbce455964112d8ac72b.tar.bz2 |
headers_check: fix perl warnings
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 <shemminger@vyatta.com>
Acked-by: WANG Cong <amwang@redhat.com>
Cc: Michal Marek <mmarek@suse.cz>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Michal Marek <mmarek@suse.cz>
Diffstat (limited to 'scripts')
-rw-r--r-- | scripts/headers_check.pl | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/scripts/headers_check.pl b/scripts/headers_check.pl index db1dd7a..50d6cfd 100644 --- a/scripts/headers_check.pl +++ b/scripts/headers_check.pl @@ -28,11 +28,12 @@ my $lineno = 0; 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(); @@ -40,7 +41,7 @@ foreach my $file (@files) { &check_declarations(); # Dropped for now. Too much noise &check_config(); } - close FH; + close $fh; } exit $ret; @@ -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; |