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

[lintian] 02/04: c/copyright: Minor refactoring



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

nthykier pushed a commit to branch master
in repository lintian.

commit a26cacc56f1e8f5c6deaaa916ed2f23f5fd9e9d8
Author: Niels Thykier <niels@thykier.net>
Date:   Fri Sep 26 23:35:41 2014 +0200

    c/copyright: Minor refactoring
    
    Signed-off-by: Niels Thykier <niels@thykier.net>
---
 checks/copyright-file.pm | 9 ++++-----
 1 file changed, 4 insertions(+), 5 deletions(-)

diff --git a/checks/copyright-file.pm b/checks/copyright-file.pm
index 5734843..0ff0d4e 100644
--- a/checks/copyright-file.pm
+++ b/checks/copyright-file.pm
@@ -316,12 +316,11 @@ sub run {
     if ($gpl || m,/usr/share/common-licenses/GPL,) {
         unless (m,exception|exemption|/usr/share/common-licenses/(?!GPL)\S,) {
             my @depends;
-            if (defined $info->field('depends')) {
-                @depends = split(/\s*,\s*/, scalar $info->field('depends'));
+            if (my $field = $info->field('depends')) {
+                @depends = split(/\s*,\s*/, $field);
             }
-            if (defined $info->field('pre-depends')) {
-                push @depends,
-                  split(/\s*,\s*/, scalar $info->field('pre-depends'));
+            if (my $field = $info->field('pre-depends')) {
+                push(@depends, split(/\s*,\s*/, $field));
             }
             if (any { /^libssl[0-9.]+(?:\s|\z)/ && !/\|/ } @depends) {
                 tag 'possible-gpl-code-linked-with-openssl';

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


Reply to: