From 8c75f44603dd9ad9c5e71347f1f2d6e0c84790b0 Mon Sep 17 00:00:00 2001 From: Miroslav Lichvar Date: Mon, 10 Aug 2020 16:22:19 +0200 Subject: [PATCH] ntp: fix comments Fix typos and remove an obsolete comment. --- ntp_core.c | 6 +----- ntp_sources.c | 4 ++-- 2 files changed, 3 insertions(+), 7 deletions(-) diff --git a/ntp_core.c b/ntp_core.c index 8c817a6..c306b03 100644 --- a/ntp_core.c +++ b/ntp_core.c @@ -1017,12 +1017,8 @@ transmit_packet(NTP_Mode my_mode, /* The mode this machine wants to be */ message.poll = my_poll; message.precision = precision; - - /* If we're sending a client mode packet and we aren't synchronized yet, - we might have to set up artificial values for some of these parameters */ message.root_delay = UTI_DoubleToNtp32(our_root_delay); message.root_dispersion = UTI_DoubleToNtp32(our_root_dispersion); - message.reference_id = htonl(our_ref_id); /* Now fill in timestamps */ @@ -2100,7 +2096,7 @@ NCR_ProcessRxUnknown(NTP_Remote_Address *remote_addr, NTP_Local_Address *local_a } /* If it is an NTPv4 packet with a long MAC and no extension fields, - respond with a NTPv3 packet to avoid breaking RFC 7822 and keep + respond with an NTPv3 packet to avoid breaking RFC 7822 and keep the length symmetric. Otherwise, respond with the same version. */ if (info.version == 4 && info.ext_fields == 0 && info.auth.mode == NTP_AUTH_SYMMETRIC && info.auth.mac.length > NTP_MAX_V4_MAC_LENGTH) diff --git a/ntp_sources.c b/ntp_sources.c index e015de7..b371d44 100644 --- a/ntp_sources.c +++ b/ntp_sources.c @@ -80,8 +80,8 @@ static uint32_t last_conf_id = 0; /* Source scheduled for name resolving (first resolving or replacement) */ struct UnresolvedSource { - /* Current address of the source (IDADDR_ID is used for a single source - with unknown address and IPADDR_UNSPEC for a pool of sources */ + /* Current address of the source (IPADDR_ID is used for a single source + with unknown address and IPADDR_UNSPEC for a pool of sources) */ NTP_Remote_Address address; /* ID of the pool if not a single source */ int pool_id;