From e401cb4a008eb4271a7a9dd852c8bba52173d3d2 Mon Sep 17 00:00:00 2001 From: david Date: Sat, 16 Aug 2008 01:45:14 +0000 Subject: [PATCH] Reuse a cached copy of the result of freshPortsLeft() instead of calculating it again. --- scan_engine.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scan_engine.cc b/scan_engine.cc index 2e60aedf9..f7fdfe873 100644 --- a/scan_engine.cc +++ b/scan_engine.cc @@ -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);