1
0
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:
david
2008-08-16 01:45:14 +00:00
parent 1c727400d2
commit e401cb4a00

View File

@@ -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);