Subject: | Dummy functions setdbg and settimeout don't return "success" |
The no-op functions setdbg and settimeout have no explicit return value
so I believe they return an empty list. Callers of these functions
expect a non-zero return value to mean "success", and interpret the
empty list as "failure", leading to warnings like "failed to set timeout
value". Would it not be better to explicitly return 1 from these
functions so that callers get the result they're expecting (as per the
attached patch)?
Apologies if I've misunderstood something - I'm not a native perl speaker.
Subject: | Sendmail-PMilter-0.97-setdbg-settimeout.patch |
--- Sendmail-PMilter-0.97/lib/Sendmail/Milter.pm 2004-08-10 22:10:32.000000000 +0100
+++ Sendmail-PMilter-0.97/lib/Sendmail/Milter.pm 2009-09-25 11:34:54.000000000 +0100
@@ -134,10 +134,12 @@
sub setdbg ($) {
# no-op
+ 1;
}
sub settimeout ($) {
# no-op
+ 1;
}
1;