mirror of
https://github.com/nmap/nmap.git
synced 2026-08-04 14:49:29 +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:
parent
6ad92e7983
commit
c2bedcf99a
1 changed files with 1 additions and 1 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue