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

[lintian] 02/04: c/r-html-reports: Save two hash lookups in map_maintainer



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

nthykier pushed a commit to branch master
in repository lintian.

commit cf82f90f0d97cb98aad98bb8efe345f71a9d7036
Author: Niels Thykier <niels@thykier.net>
Date:   Thu Jul 6 20:33:11 2017 +0000

    c/r-html-reports: Save two hash lookups in map_maintainer
    
    Signed-off-by: Niels Thykier <niels@thykier.net>
---
 commands/reporting-html-reports.pm | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/commands/reporting-html-reports.pm b/commands/reporting-html-reports.pm
index 5cf2e2e..f66874f 100644
--- a/commands/reporting-html-reports.pm
+++ b/commands/reporting-html-reports.pm
@@ -1019,8 +1019,8 @@ sub parse_lintian_log {
 sub map_maintainer {
     my ($urlmap, $maintainer) = @_;
     my $url = maintainer_url($maintainer);
-    if ($urlmap->{$url} && $urlmap->{$url} ne $maintainer) {
-        $maintainer = $urlmap->{$url};
+    if (defined(my $res = $urlmap->{$url})) {
+        $maintainer = $res;
     } else {
         $urlmap->{$url} = $maintainer;
     }

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


Reply to: