Commit 48426bda authored by Alessandro Rubini's avatar Alessandro Rubini

general: use clear_TimeInternal when needed

Signed-off-by: Alessandro Rubini's avatarAlessandro Rubini <rubini@gnudd.com>
parent ee21b718
......@@ -19,10 +19,8 @@ void m1(struct pp_instance *ppi)
{
/* Current data set update */
DSCUR(ppi)->stepsRemoved = 0;
DSCUR(ppi)->offsetFromMaster.nanoseconds = 0;
DSCUR(ppi)->offsetFromMaster.seconds = 0;
DSCUR(ppi)->meanPathDelay.nanoseconds = 0;
DSCUR(ppi)->meanPathDelay.seconds = 0;
clear_TimeInternal(&DSCUR(ppi)->offsetFromMaster);
clear_TimeInternal(&DSCUR(ppi)->meanPathDelay);
/* Parent data set */
memcpy(DSPAR(ppi)->parentPortIdentity.clockIdentity,
......
......@@ -57,8 +57,7 @@ int pp_initializing(struct pp_instance *ppi, unsigned char *pkt, int plen)
ppi->defaultDS->clockIdentity, PP_CLOCK_IDENTITY_LENGTH);
port->portIdentity.portNumber = 1;
port->logMinDelayReqInterval = PP_DEFAULT_DELAYREQ_INTERVAL;
port->peerMeanPathDelay.seconds = 0;
port->peerMeanPathDelay.nanoseconds = 0;
clear_TimeInternal(&port->peerMeanPathDelay);
port->logAnnounceInterval = opt->announce_intvl;
port->announceReceiptTimeout = PP_DEFAULT_ANNOUNCE_RECEIPT_TIMEOUT;
port->logSyncInterval = opt->sync_intvl;
......
......@@ -29,14 +29,10 @@ int pp_slave(struct pp_instance *ppi, unsigned char *pkt, int plen)
ppi->waiting_for_follow = FALSE;
ppi->pdelay_req_send_time.seconds = 0;
ppi->pdelay_req_send_time.nanoseconds = 0;
ppi->pdelay_req_receive_time.seconds = 0;
ppi->pdelay_req_receive_time.nanoseconds = 0;
ppi->pdelay_resp_send_time.seconds = 0;
ppi->pdelay_resp_send_time.nanoseconds = 0;
ppi->pdelay_resp_receive_time.seconds = 0;
ppi->pdelay_resp_receive_time.nanoseconds = 0;
clear_TimeInternal(&ppi->pdelay_req_send_time);
clear_TimeInternal(&ppi->pdelay_req_receive_time);
clear_TimeInternal(&ppi->pdelay_resp_send_time);
clear_TimeInternal(&ppi->pdelay_resp_receive_time);
st_com_restart_annrec_timer(ppi);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment