Change-Id: I64cf1d4e1728c31ced40aff865d66b5b4356560f
Signed-off-by: Cliff Spradlin <[email protected]>
---
 nullf.c | 4 ++--
 pi.c    | 6 +++---
 2 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/nullf.c b/nullf.c
index 5512837..9a40d07 100644
--- a/nullf.c
+++ b/nullf.c
@@ -44,8 +44,8 @@ static double nullf_sample(struct servo *servo, int64_t 
offset,
        }
 
        if ((servo->first_update && servo->first_step_threshold &&
-            servo->first_step_threshold < fabs(offset)) ||
-           (servo->step_threshold && servo->step_threshold < fabs(offset))) {
+            servo->first_step_threshold < llabs(offset)) ||
+           (servo->step_threshold && servo->step_threshold < llabs(offset))) {
                *state = SERVO_JUMP;
        } else {
                *state = SERVO_UNLOCKED;
diff --git a/pi.c b/pi.c
index 35556e1..bfe5022 100644
--- a/pi.c
+++ b/pi.c
@@ -112,9 +112,9 @@ static double pi_sample(struct servo *servo,
 
                if ((servo->first_update &&
                     servo->first_step_threshold &&
-                    servo->first_step_threshold < fabs(offset)) ||
+                    servo->first_step_threshold < llabs(offset)) ||
                    (servo->step_threshold &&
-                    servo->step_threshold < fabs(offset)))
+                    servo->step_threshold < llabs(offset)))
                        *state = SERVO_JUMP;
                else
                        *state = SERVO_LOCKED;
@@ -131,7 +131,7 @@ static double pi_sample(struct servo *servo,
                 * clock startup.
                 */
                if (servo->step_threshold &&
-                   servo->step_threshold < fabs(offset)) {
+                   servo->step_threshold < llabs(offset)) {
                        *state = SERVO_UNLOCKED;
                        s->count = 0;
                        break;
-- 
2.19.1.568.g152ad8e336-goog



_______________________________________________
Linuxptp-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/linuxptp-devel

Reply via email to