mirror of
https://github.com/nmap/nmap.git
synced 2026-01-01 20:39:02 +00:00
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.
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user