W3C home > Mailing lists > Public > www-validator-cvs@w3.org > February 2008

perl/modules/W3C/LinkChecker/bin checklink,4.84,4.85

From: Ville Skytta via cvs-syncmail <cvsmail@w3.org>
Date: Sun, 10 Feb 2008 12:06:34 +0000
To: www-validator-cvs@w3.org
Message-Id: <E1JOAx8-0004pW-G2@lionel-hutz.w3.org>

Update of /sources/public/perl/modules/W3C/LinkChecker/bin
In directory hutz:/tmp/cvs-serv18543

Modified Files:
	checklink 
Log Message:
Avoid division by zero in progress indicator for docs that contain no linefeeds.

Index: checklink
===================================================================
RCS file: /sources/public/perl/modules/W3C/LinkChecker/bin/checklink,v
retrieving revision 4.84
retrieving revision 4.85
diff -u -d -r4.84 -r4.85
--- checklink	10 Feb 2008 12:02:29 -0000	4.84
+++ checklink	10 Feb 2008 12:06:32 -0000	4.85
@@ -1431,7 +1431,7 @@
 {
   my ($self, $line) = @_;
   printf("\r%4d%%", int($line/$self->{Total}*100))
-    if (defined($line) && $line >= 0);
+    if (defined($line) && $line >= 0 && $self->{Total} > 0);
   return;
 }
 
Received on Sunday, 10 February 2008 12:06:45 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Thursday, 26 April 2012 12:55:00 GMT