mirror of
https://github.com/nmap/nmap.git
synced 2025-12-27 18:09:01 +00:00
Reuse a cached copy of the result of freshPortsLeft() instead of calculating it
again.
This commit is contained in:
@@ -1377,7 +1377,7 @@ double UltraScanInfo::getCompletionFraction() {
|
||||
rate = (double) host->numprobes_sent / (gstats->numprobes - ports_left);
|
||||
/* Find out how many probes it will take to scan the remainder of the ports
|
||||
at that rate. */
|
||||
probes_left = rate * host->freshPortsLeft();
|
||||
probes_left = rate * ports_left;
|
||||
/* Get the completion fraction: number of probes sent divided by estimated
|
||||
total number of probes. */
|
||||
total += (double) host->numprobes_sent / (host->numprobes_sent + probes_left);
|
||||
|
||||
Reference in New Issue
Block a user