cnfsstat -a warns about uninitialized value for new buffer
Florian Schlichting
fschlich at CIS.FU-Berlin.DE
Wed Oct 20 17:03:33 UTC 2010
Hi Julien,
I just created new CNFS buffers and noticed that 'cnfsstat -a' will spit
warnings about uninitialized values when trying to compute the oldest
article in those yet-unused buffers:
Buffer BUFF09, size: 2.00 GBytes, position: 80.0 kBytes 0.00 cycles
Newest: 2010-10-20 18:29:10, 0 days, 0:09:33 ago
Use of uninitialized value $t in localtime at /server/feeder/server/bin/cnfsstat line 306.
Use of uninitialized value $t in subtraction (-) at /server/feeder/server/bin/cnfsstat line 310.
Oldest: 1970-01-01 1:00:00, 14902 days, 16:38:43 ago
Apparently, $oldart is undef in print_cycbuff_head, whereas make_time
assumes its argument to be numerical. A quick solution is below, but you
may want to do something similar in the call to make_time instead...
--- a/frontends/cnfsstat.in
+++ b/frontends/cnfsstat.in
@@ -300,7 +300,7 @@ sub print_cycbuff_head {
}
sub make_time {
- my ($t) = @_;
+ my ($t) = @_ || (0);
my (@ret);
my ($sec,$min,$hour,$mday,$mon,$year) =
Regards,
Florian
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/x-pkcs7-signature
Size: 5557 bytes
Desc: not available
URL: <https://lists.isc.org/pipermail/inn-workers/attachments/20101020/94115617/attachment.bin>
More information about the inn-workers
mailing list