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

[lintian] 01/01: c/changelog-file: Remove an unnecessary branch



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

nthykier pushed a commit to branch master
in repository lintian.

commit 3274e0343d47b0e82a07917e45f74178d101fb10
Author: Niels Thykier <niels@thykier.net>
Date:   Sat Dec 31 11:52:37 2016 +0000

    c/changelog-file: Remove an unnecessary branch
    
    Signed-off-by: Niels Thykier <niels@thykier.net>
---
 checks/changelog-file.pm | 12 +++---------
 1 file changed, 3 insertions(+), 9 deletions(-)

diff --git a/checks/changelog-file.pm b/checks/changelog-file.pm
index 584c786..fd48cfe 100644
--- a/checks/changelog-file.pm
+++ b/checks/changelog-file.pm
@@ -149,15 +149,9 @@ sub run {
     }
 
     # is this a native Debian package?
-    my $version;
-    if (defined $info->field('version')) {
-        $version = $info->field('version');
-    } else {
-        # We do not know, but we assume it to be non-native
-        # as that is most likely.
-        $version = '0-1';
-    }
-
+    # If the version is missing, we assume it to be non-native
+    # as it is the most likely case.
+    my $version = $info->field('version', '0-1');
     $native_pkg  = $info->native;
     $foreign_pkg = (!$native_pkg && $version !~ m/-0\./);
     # A version of 1.2.3-0.1 could be either, so in that

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


Reply to: