[lintian] 02/04: c/fields.pm: Avoid a conditional initialisation
This is an automated email from the git hooks/post-receive script.
nthykier pushed a commit to branch master
in repository lintian.
commit a7c08bbd117ff3d0c7c8dad1daec3c30fc5d59f2
Author: Niels Thykier <niels@thykier.net>
Date: Sun Jul 19 14:55:01 2015 +0200
c/fields.pm: Avoid a conditional initialisation
Signed-off-by: Niels Thykier <niels@thykier.net>
---
checks/fields.pm | 5 ++---
1 file changed, 2 insertions(+), 3 deletions(-)
diff --git a/checks/fields.pm b/checks/fields.pm
index c0b2b1a..09d3afc 100644
--- a/checks/fields.pm
+++ b/checks/fields.pm
@@ -1300,9 +1300,8 @@ sub _split_dep {
my ($pkg, $dmarch, $version, $darch, $restr)
= ('', '', ['',''], [[], 0], []);
- my $pkgname = $1 if $dep =~ s/^\s*([^<\s\[\(]+)\s*//;
- if (defined $pkgname) {
- ($pkg, $dmarch) = split /:/, $pkgname, 2;
+ if ($dep =~ s/^\s*([^<\s\[\(]+)\s*//) {
+ ($pkg, $dmarch) = split(/:/, $1, 2);
$dmarch //= ''; # Ensure it is defined (in case there is no ":")
}
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/lintian/lintian.git
Reply to: