From c2bedcf99a1964cd7773fcd1b6a114a411fb77de Mon Sep 17 00:00:00 2001 From: david Date: Wed, 11 Feb 2009 17:36:11 +0000 Subject: [PATCH] Fix a test against a struct timeval in ScanProgressMeter::printStatsIfNecessary. The test was (last_print.tv_sec < 0), which is never true. I changed it to last_print.tv_sec == 0, which checks if the last_print structure has been given a value yet. This little bug appears not to have mattered much, because in the else branch of the if, other calculations with an uninitialized last_est struct seem to have resulted in a true value anyway. --- timing.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/timing.cc b/timing.cc index 3c5b1bfd6..bad944cb7 100644 --- a/timing.cc +++ b/timing.cc @@ -529,7 +529,7 @@ bool ScanProgressMeter::printStatsIfNecessary(double perc_done, /* If we have not printed before, or if our previous ETC has elapsed, print a new one */ - if (last_print.tv_sec < 0) + if (last_print.tv_sec == 0) printit = true; else { /* If the estimate changed by more than X minutes, and if that