[Pkg-clamav-commits] [SCM] Debian repository for ClamAV branch, debian/unstable, updated. debian/0.95+dfsg-1-6156-g094ec9b

Török Edvin edwin at clamav.net
Sun Apr 4 01:08:35 UTC 2010


The following commit has been merged in the debian/unstable branch:
commit cab1b4759f741dfa4f6d0f9cd20334b53c602e76
Author: Török Edvin <edwin at clamav.net>
Date:   Wed Oct 28 15:15:58 2009 +0200

    Use a double instead of an integer to avoid negative time (bb #1731).

diff --git a/ChangeLog b/ChangeLog
index de63670..a181dbe 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,7 @@
+Wed Oct 28 15:15:05 EET 2009 (edwin)
+------------------------------------
+ * clamd/thrmgr.c: use a double instead of integer to avoid negative time (bb #1731).
+
 Wed Oct 28 12:42:45 CET 2009 (tk)
 ---------------------------------
  * libclamav/filetypes_int.h: sync with daily.ftm
diff --git a/clamd/thrmgr.c b/clamd/thrmgr.c
index de82f9f..0a20bbe 100644
--- a/clamd/thrmgr.c
+++ b/clamd/thrmgr.c
@@ -237,11 +237,11 @@ int thrmgr_printstats(int f)
 		print_queue(f, pool->single_queue, &tv_now);
 		mdprintf(f, "\n");
 		for(task = pool->tasks; task; task = task->nxt) {
-			long delta;
+			double delta;
 			size_t used, total;
 
 			delta = tv_now.tv_usec - task->tv.tv_usec;
-			delta += (tv_now.tv_sec - task->tv.tv_sec)*1000000;
+			delta += (tv_now.tv_sec - task->tv.tv_sec)*1000000.0;
 			mdprintf(f,"\t%s %f %s\n",
 					task->command ? task->command : "N/A",
 					delta/1e6,

-- 
Debian repository for ClamAV



More information about the Pkg-clamav-commits mailing list