[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

[lintian] 01/03: L::C::Binary: Avoid duplicate string manipulation



This is an automated email from the git hooks/post-receive script.

nthykier pushed a commit to branch master
in repository lintian.

commit 809682c1a18e8f15fe264f96f0d2e6125dcadf08
Author: Niels Thykier <niels@thykier.net>
Date:   Sat Jan 7 12:36:47 2017 +0000

    L::C::Binary: Avoid duplicate string manipulation
    
    Signed-off-by: Niels Thykier <niels@thykier.net>
---
 lib/Lintian/Collect/Binary.pm | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/lib/Lintian/Collect/Binary.pm b/lib/Lintian/Collect/Binary.pm
index 0564695..6f391c7 100644
--- a/lib/Lintian/Collect/Binary.pm
+++ b/lib/Lintian/Collect/Binary.pm
@@ -284,12 +284,12 @@ Needs-Info requirements for using I<strings>: strings
 
 sub strings {
     my ($self, $file) = @_;
-    my $real = $self->_fetch_extracted_dir('strings', 'strings', $file);
-    if (not -f "${real}.gz") {
+    my $real = $self->_fetch_extracted_dir('strings', 'strings', "${file}.gz");
+    if (not -f $real) {
         open(my $fd, '<', '/dev/null');
         return $fd;
     }
-    my $fd = open_gz("$real.gz");
+    my $fd = open_gz($real);
     return $fd;
 }
 

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/lintian/lintian.git


Reply to: