about summary refs log tree commit homepage
path: root/public-inbox-mda
diff options
context:
space:
mode:
authorEric Wong <e@80x24.org>2015-08-29 21:30:27 +0000
committerEric Wong <e@80x24.org>2015-08-29 21:35:39 +0000
commit28ee19c32a1ecf8e22f30e8f9de860695f4fb30c (patch)
tree40a372c8d3c61d7e2917d0b4c981ae61df0e0397 /public-inbox-mda
parent26e69c85938c62774f20fd1861b67bcb01ba477d (diff)
downloadpublic-inbox-28ee19c32a1ecf8e22f30e8f9de860695f4fb30c.tar.gz
Perl does not currently optimize for this.

ref (from p5p):
http://mid.gmane.org/D5C27970-9176-4C7A-8B99-7D78360E67A2@pobox.com
Diffstat (limited to 'public-inbox-mda')
-rwxr-xr-xpublic-inbox-mda4
1 files changed, 2 insertions, 2 deletions
diff --git a/public-inbox-mda b/public-inbox-mda
index c4822b61..b1f33af5 100755
--- a/public-inbox-mda
+++ b/public-inbox-mda
@@ -64,7 +64,7 @@ if (PublicInbox::MDA->precheck($filter, $dst->{address}) &&
 } else {
         # Ensure emergency spam gets spamassassin headers.
         # This makes it easier to prioritize obvious spam from less obvious
-        if (defined($filtered) && length($filtered)) {
+        if (defined($filtered) && $filtered ne '') {
                 my $drop = Email::MIME->new(\$filtered);
                 $filtered = undef;
                 $filter->simple($drop);
@@ -82,7 +82,7 @@ sub do_spamc {
                 run([qw/spamc -E --headers/], \$orig, $out);
         };
 
-        return ($@ || $? || !defined($$out) || length($$out) == 0) ? 0 : 1;
+        return ($@ || $? || !defined($$out) || $$out eq '') ? 0 : 1;
 }
 
 sub search_index_sync {