tmv: Add missing uses of tmv_is_zero()
Signed-off-by: Michael Brown <mbrown@fensystems.co.uk>master
parent
288810bb36
commit
5df2779ef0
4
clock.c
4
clock.c
|
@ -569,7 +569,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
|
* By leaving out the path delay altogther, we can avoid the
|
||||||
* error caused by our imperfect path delay measurement.
|
* error caused by our imperfect path delay measurement.
|
||||||
*/
|
*/
|
||||||
if (!f->ingress1) {
|
if (tmv_is_zero(f->ingress1)) {
|
||||||
f->ingress1 = ingress;
|
f->ingress1 = ingress;
|
||||||
f->origin1 = origin;
|
f->origin1 = origin;
|
||||||
return state;
|
return state;
|
||||||
|
@ -1697,7 +1697,7 @@ static void handle_state_decision_event(struct clock *c)
|
||||||
if (!cid_eq(&best_id, &c->best_id)) {
|
if (!cid_eq(&best_id, &c->best_id)) {
|
||||||
clock_freq_est_reset(c);
|
clock_freq_est_reset(c);
|
||||||
tsproc_reset(c->tsproc, 1);
|
tsproc_reset(c->tsproc, 1);
|
||||||
if (c->initial_delay)
|
if (!tmv_is_zero(c->initial_delay))
|
||||||
tsproc_set_delay(c->tsproc, c->initial_delay);
|
tsproc_set_delay(c->tsproc, c->initial_delay);
|
||||||
c->ingress_ts = tmv_zero();
|
c->ingress_ts = tmv_zero();
|
||||||
c->path_delay = c->initial_delay;
|
c->path_delay = c->initial_delay;
|
||||||
|
|
2
port.c
2
port.c
|
@ -924,7 +924,7 @@ static void port_nrate_calculate(struct port *p, tmv_t origin, tmv_t ingress)
|
||||||
*/
|
*/
|
||||||
p->pdr_missing = 0;
|
p->pdr_missing = 0;
|
||||||
|
|
||||||
if (!n->ingress1) {
|
if (tmv_is_zero(n->ingress1)) {
|
||||||
n->ingress1 = ingress;
|
n->ingress1 = ingress;
|
||||||
n->origin1 = origin;
|
n->origin1 = origin;
|
||||||
return;
|
return;
|
||||||
|
|
Loading…
Reference in New Issue