... | ... |
@@ -1,3 +1,7 @@ |
1 |
+Wed Oct 28 15:15:05 EET 2009 (edwin) |
|
2 |
+------------------------------------ |
|
3 |
+ * clamd/thrmgr.c: use a double instead of integer to avoid negative time (bb #1731). |
|
4 |
+ |
|
1 | 5 |
Wed Oct 28 12:41:34 CET 2009 (tk) |
2 | 6 |
--------------------------------- |
3 | 7 |
* libclamav/filetypes_int.h: sync with daily.ftm |
... | ... |
@@ -240,11 +240,11 @@ int thrmgr_printstats(int f) |
240 | 240 |
print_queue(f, pool->single_queue, &tv_now); |
241 | 241 |
mdprintf(f, "\n"); |
242 | 242 |
for(task = pool->tasks; task; task = task->nxt) { |
243 |
- long delta; |
|
243 |
+ double delta; |
|
244 | 244 |
size_t used, total; |
245 | 245 |
|
246 | 246 |
delta = tv_now.tv_usec - task->tv.tv_usec; |
247 |
- delta += (tv_now.tv_sec - task->tv.tv_sec)*1000000; |
|
247 |
+ delta += (tv_now.tv_sec - task->tv.tv_sec)*1000000.0; |
|
248 | 248 |
mdprintf(f,"\t%s %f %s\n", |
249 | 249 |
task->command ? task->command : "N/A", |
250 | 250 |
delta/1e6, |