From 2336ed0ee0e4410c7adfc10159de94dc1a29aa58 Mon Sep 17 00:00:00 2001 From: Guillaume Rousse Date: Sun, 10 Feb 2008 14:11:25 +0000 Subject: no need to duplicate variable --- strip_files | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) (limited to 'strip_files') diff --git a/strip_files b/strip_files index 50a57ef..37c525d 100755 --- a/strip_files +++ b/strip_files @@ -33,13 +33,11 @@ sub testfile() { # skip excluded files return if $File::Find::name =~ $exclude_pattern; - my $fn = "$File::Find::dir/$_"; - # Does its filename look like a shared library? if (m/\.so/) { # Ok, do the expensive test. if (expensive_test($_) =~ m/ELF.*shared/) { - push @executables, $fn; + push @executables, $File::Find::name; return; } } @@ -49,14 +47,14 @@ sub testfile() { if ($mode & 0111) { # Ok, expensive test. if (expensive_test($_) =~ m/ELF.*executable/) { - push @executables, $fn; + push @executables, $File::Find::name; return; } } # Is it a static library, and not a debug library? if (m/lib.*\.a/ && ! m/_g\.a/) { - push @static_libs, $fn; + push @static_libs, $File::Find::name; return; } } -- cgit v1.2.1