From: Miroslav Lichvar Date: Mon, 18 Apr 2011 10:36:02 +0000 (+0200) Subject: Ignore extra samples in reported nruns X-Git-Tag: 1.25-pre2~3 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=70735d8d7914ef47db1f74da047093e094e70870;p=thirdparty%2Fchrony.git Ignore extra samples in reported nruns --- diff --git a/regress.c b/regress.c index af69e113..e78fafe4 100644 --- a/regress.c +++ b/regress.c @@ -299,6 +299,10 @@ 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) { + /* Ignore extra samples in returned nruns */ + nruns = n_runs_from_residuals(resid - resid_start, n); + } break; } else { /* Try dropping one sample at a time until the runs test passes. */