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

[lintian] 02/02: checks/dup-files: Avoid useless "index" calls



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

nthykier pushed a commit to branch master
in repository lintian.

commit cd935d04a5459f44234e2b601009b19d383d0591
Author: Niels Thykier <niels@thykier.net>
Date:   Wed Oct 8 00:02:58 2014 +0200

    checks/dup-files: Avoid useless "index" calls
    
    Replace $info->index($path)->X with $path->X, since
    $info->index($path) is an identity function when $path is a L::Path
    object.
    
    Signed-off-by: Niels Thykier <niels@thykier.net>
---
 checks/duplicate-files.pm | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/checks/duplicate-files.pm b/checks/duplicate-files.pm
index 0e6cf92..260addd 100644
--- a/checks/duplicate-files.pm
+++ b/checks/duplicate-files.pm
@@ -35,11 +35,11 @@ sub run {
         my $md5 = $info->md5sums->{$file};
         my $fs;
         next unless defined $md5;
-        next unless $info->index($file)->is_regular_file;
+        next unless $file->is_regular_file;
         # Ignore empty files; in some cases (e.g. python) a file is
         # required even if it is empty and we are never looking at a
         # substantial gain in such a case.  Also see #632789
-        next unless $info->index($file)->size;
+        next unless $file->size;
         next unless $file =~ m{\A usr/share/doc/}xsmo;
         $fs = $hashmap{$md5};
         unless (defined $fs){

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


Reply to: