diff options
| author | Takashi Iwai <tiwai@suse.de> | 2010-06-02 14:15:10 +0200 |
|---|---|---|
| committer | Takashi Iwai <tiwai@suse.de> | 2010-06-02 14:15:10 +0200 |
| commit | e4caa8bab3862a7694ab7c6dfede223227ad7fc5 (patch) | |
| tree | 9fa537a72f00f6b4f86c2da7be2e9554304a8ec4 /scripts/checkversion.pl | |
| parent | 9f75c1b12c5ef392ddcea575b13560842c28b1b3 (diff) | |
| parent | edb39935c8b19fcd9a8f619d0bc1e9d04594cd2b (diff) | |
Merge branch 'master' of git.alsa-project.org:alsa-kernel into fix/hda
Diffstat (limited to 'scripts/checkversion.pl')
| -rwxr-xr-x | scripts/checkversion.pl | 23 |
1 files changed, 11 insertions, 12 deletions
diff --git a/scripts/checkversion.pl b/scripts/checkversion.pl index ec7d21161bd..b444e89a009 100755 --- a/scripts/checkversion.pl +++ b/scripts/checkversion.pl @@ -5,23 +5,22 @@ # including <linux/version.h> that don't need it. # Copyright (C) 2003, Randy Dunlap <rdunlap@xenotime.net> +use strict; + $| = 1; -my $debugging = 0; +my $debugging; -foreach $file (@ARGV) -{ +foreach my $file (@ARGV) { # Open this file. - open(FILE, $file) || die "Can't open $file: $!\n"; + open( my $f, '<', $file ) + or die "Can't open $file: $!\n"; # Initialize variables. - my $fInComment = 0; - my $fInString = 0; - my $fUseVersion = 0; + my ($fInComment, $fInString, $fUseVersion); my $iLinuxVersion = 0; - LINE: while ( <FILE> ) - { + while (<$f>) { # Strip comments. $fInComment && (s+^.*?\*/+ +o ? ($fInComment = 0) : next); m+/\*+o && (s+/\*.*?\*/+ +go, (s+/\*.*$+ +o && ($fInComment = 1))); @@ -43,8 +42,8 @@ foreach $file (@ARGV) # Look for uses: LINUX_VERSION_CODE, KERNEL_VERSION, UTS_RELEASE if (($_ =~ /LINUX_VERSION_CODE/) || ($_ =~ /\WKERNEL_VERSION/)) { $fUseVersion = 1; - last LINE if $iLinuxVersion; - } + last if $iLinuxVersion; + } } # Report used version IDs without include? @@ -67,5 +66,5 @@ foreach $file (@ARGV) } } - close(FILE); + close($f); } |
