diff options
author | rillig <rillig@pkgsrc.org> | 2015-10-15 03:00:56 +0000 |
---|---|---|
committer | rillig <rillig@pkgsrc.org> | 2015-10-15 03:00:56 +0000 |
commit | 8c13333953f4207b313ca18db5832b20da5fbadf (patch) | |
tree | 8c0e3ca717d110b54e523705ba2e276e96c06f4f /pkgtools | |
parent | d5e74862b9bffffde0543921aadfdb8a54953fa4 (diff) | |
download | pkgsrc-8c13333953f4207b313ca18db5832b20da5fbadf.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.pl | 6 |
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($$) { |