summaryrefslogtreecommitdiff
path: root/pkgtools
diff options
context:
space:
mode:
authorrillig <rillig@pkgsrc.org>2015-10-15 03:00:56 +0000
committerrillig <rillig@pkgsrc.org>2015-10-15 03:00:56 +0000
commit93e1a5ad6d8df4335ba20ab44986da02edb7f5da (patch)
tree8c0e3ca717d110b54e523705ba2e276e96c06f4f /pkgtools
parentb60bcff0ee6db7d66e71c025ce7930c18f4f53e8 (diff)
downloadpkgsrc-93e1a5ad6d8df4335ba20ab44986da02edb7f5da.tar.gz
Reverted part of 1.888 (perlcritic --stern)
The warning that "return undef" is bad must be taken with great care. Although perlcritic explains it a lot and warns to think before simply fixing it, it doesn't mention that in some cases a simple "return" means "return '0'", which had happened here.
Diffstat (limited to 'pkgtools')
-rw-r--r--pkgtools/pkglint/files/pkglint.pl6
1 files changed, 3 insertions, 3 deletions
diff --git a/pkgtools/pkglint/files/pkglint.pl b/pkgtools/pkglint/files/pkglint.pl
index 637ef40e9de..85ebdc320e9 100644
--- a/pkgtools/pkglint/files/pkglint.pl
+++ b/pkgtools/pkglint/files/pkglint.pl
@@ -1,5 +1,5 @@
#! @PERL@
-# $NetBSD: pkglint.pl,v 1.892 2015/10/15 02:09:49 rillig Exp $
+# $NetBSD: pkglint.pl,v 1.893 2015/10/15 03:00:56 rillig Exp $
#
# pkglint - static analyzer and checker for pkgsrc packages
@@ -619,7 +619,7 @@ sub parse_acls($$) {
) (?:\,\s*|$)"x;
if (!defined($acltext)) {
- return;
+ return undef;
}
$acls = [];
@@ -1807,7 +1807,7 @@ sub get_variable_type($$) {
}
$opt_debug_vartypes and $line->log_debug("No type definition found for ${varcanon}.");
- return;
+ return undef;
}
sub get_variable_perms($$) {