[lintian] 01/01: L::Util: Minor optimisation of a common case
This is an automated email from the git hooks/post-receive script.
nthykier pushed a commit to branch master
in repository lintian.
commit d4aeab4b02787a2521c712fdc3228348989fd856
Author: Niels Thykier <niels@thykier.net>
Date: Mon Feb 3 21:16:50 2014 +0100
L::Util: Minor optimisation of a common case
Signed-off-by: Niels Thykier <niels@thykier.net>
---
lib/Lintian/Util.pm | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/lib/Lintian/Util.pm b/lib/Lintian/Util.pm
index 42751bb..0cca7e2 100644
--- a/lib/Lintian/Util.pm
+++ b/lib/Lintian/Util.pm
@@ -391,13 +391,13 @@ sub visit_dpkg_paragraph {
while (<$CONTROL>) {
chomp;
- if (/^\#/) {
+ if (substr($_, 0, 1) eq '#') {
next unless $flags & DCTRL_NO_COMMENTS;
die "syntax error at line $.: Comments are not allowed.\n";
}
# empty line?
- if ((!$debconf && m/^\s*$/) or ($debconf && $_ eq '')) {
+ if ($_ eq '' || (!$debconf && m/^\s*$/)) {
if ($open_section) { # end of current section
# pass the current section to the handler
$code->($section, $lines);
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/lintian/lintian.git
Reply to: