mirror of
https://gitlab.com/chrony/chrony.git
synced 2025-12-04 02:25:07 -05:00
ntp: simplify UTI_Ntp64ToTimespec() callers
Since UTI_Ntp64ToTimespec() was modified to handle zero timestamps, some of its callers don't need to do that anymore.
This commit is contained in:
@@ -1943,10 +1943,7 @@ NCR_ProcessRxUnknown(NTP_Remote_Address *remote_addr, NTP_Local_Address *local_a
|
|||||||
!UTI_CompareNtp64(&message->originate_ts, local_ntp_rx);
|
!UTI_CompareNtp64(&message->originate_ts, local_ntp_rx);
|
||||||
|
|
||||||
if (interleaved) {
|
if (interleaved) {
|
||||||
if (!UTI_IsZeroNtp64(local_ntp_tx))
|
|
||||||
UTI_Ntp64ToTimespec(local_ntp_tx, &local_tx.ts);
|
UTI_Ntp64ToTimespec(local_ntp_tx, &local_tx.ts);
|
||||||
else
|
|
||||||
interleaved = 0;
|
|
||||||
tx_ts = &local_tx;
|
tx_ts = &local_tx;
|
||||||
} else {
|
} else {
|
||||||
UTI_ZeroNtp64(local_ntp_tx);
|
UTI_ZeroNtp64(local_ntp_tx);
|
||||||
@@ -2041,9 +2038,6 @@ NCR_ProcessTxUnknown(NTP_Remote_Address *remote_addr, NTP_Local_Address *local_a
|
|||||||
|
|
||||||
CLG_GetNtpTimestamps(log_index, &local_ntp_rx, &local_ntp_tx);
|
CLG_GetNtpTimestamps(log_index, &local_ntp_rx, &local_ntp_tx);
|
||||||
|
|
||||||
if (UTI_IsZeroNtp64(local_ntp_tx))
|
|
||||||
return;
|
|
||||||
|
|
||||||
UTI_Ntp64ToTimespec(local_ntp_tx, &local_tx.ts);
|
UTI_Ntp64ToTimespec(local_ntp_tx, &local_tx.ts);
|
||||||
update_tx_timestamp(&local_tx, tx_ts, local_ntp_rx, NULL, message);
|
update_tx_timestamp(&local_tx, tx_ts, local_ntp_rx, NULL, message);
|
||||||
UTI_TimespecToNtp64(&local_tx.ts, local_ntp_tx, NULL);
|
UTI_TimespecToNtp64(&local_tx.ts, local_ntp_tx, NULL);
|
||||||
|
|||||||
Reference in New Issue
Block a user