Signed-off-by: Michael Brown <[email protected]>
---
clock.c | 4 ++--
port.c | 2 +-
2 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/clock.c b/clock.c
index 4532664..7af87fc 100644
--- a/clock.c
+++ b/clock.c
@@ -581,7 +581,7 @@ static enum servo_state clock_no_adjust(struct clock *c,
tmv_t ingress,
* By leaving out the path delay altogther, we can avoid the
* error caused by our imperfect path delay measurement.
*/
- if (!f->ingress1) {
+ if (tmv_is_zero(f->ingress1)) {
f->ingress1 = ingress;
f->origin1 = origin;
return state;
@@ -1712,7 +1712,7 @@ static void handle_state_decision_event(struct clock *c)
if (!cid_eq(&best_id, &c->best_id)) {
clock_freq_est_reset(c);
tsproc_reset(c->tsproc, 1);
- if (c->initial_delay)
+ if (!tmv_is_zero(c->initial_delay))
tsproc_set_delay(c->tsproc, c->initial_delay);
c->ingress_ts = tmv_zero();
c->path_delay = c->initial_delay;
diff --git a/port.c b/port.c
index 6cc5dd0..6f91320 100644
--- a/port.c
+++ b/port.c
@@ -929,7 +929,7 @@ static void port_nrate_calculate(struct port *p, tmv_t
origin, tmv_t ingress)
*/
p->pdr_missing = 0;
- if (!n->ingress1) {
+ if (tmv_is_zero(n->ingress1)) {
n->ingress1 = ingress;
n->origin1 = origin;
return;
--
2.9.5
------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Linuxptp-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/linuxptp-devel