The stats for the maximum size were not reset, which caused the
the servo to reuse old data instead of returning with unlocked
state.

Signed-off-by: Miroslav Lichvar <mlich...@redhat.com>
---
 linreg.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/linreg.c b/linreg.c
index b94c44e..fde604d 100644
--- a/linreg.c
+++ b/linreg.c
@@ -294,7 +294,7 @@ static void linreg_reset(struct servo *servo)
        s->last_update = 0;
        s->frequency_ratio = 1.0;
 
-       for (i = MIN_SIZE; i < MAX_SIZE; i++) {
+       for (i = MIN_SIZE; i <= MAX_SIZE; i++) {
                s->results[i - MIN_SIZE].slope = 0.0;
                s->results[i - MIN_SIZE].err_updates = 0;
        }
-- 
1.9.3


------------------------------------------------------------------------------
Download BIRT iHub F-Type - The Free Enterprise-Grade BIRT Server
from Actuate! Instantly Supercharge Your Business Reports and Dashboards
with Interactivity, Sharing, Native Excel Exports, App Integration & more
Get technology previously reserved for billion-dollar corporations, FREE
http://pubads.g.doubleclick.net/gampad/clk?id=157005751&iu=/4140/ostg.clktrk
_______________________________________________
Linuxptp-devel mailing list
Linuxptp-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linuxptp-devel

Reply via email to