From: Miroslav Lichvar Date: Fri, 25 Nov 2011 14:49:35 +0000 (+0100) Subject: Fix reported number of runs to correspond to reported number of samples X-Git-Tag: 1.27-pre1~22 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=b485051b65327f957f49766e34cbfa3544eeb7ea;p=thirdparty%2Fchrony.git Fix reported number of runs to correspond to reported number of samples --- diff --git a/regress.c b/regress.c index 9322d1ff..cd5edbd4 100644 --- a/regress.c +++ b/regress.c @@ -300,9 +300,9 @@ RGR_FindBestRegression nruns = n_runs_from_residuals(resid, n - resid_start); if (nruns > critical_runs[n - resid_start] || n - start <= MIN_SAMPLES_FOR_REGRESS) { - if (resid_start < 0) { + if (start != resid_start) { /* Ignore extra samples in returned nruns */ - nruns = n_runs_from_residuals(resid - resid_start, n); + nruns = n_runs_from_residuals(resid - resid_start + start, n - start); } break; } else {