summaryrefslogtreecommitdiff
path: root/ntpdate/ntpdate.c
diff options
context:
space:
mode:
authorCy Schubert <cy@FreeBSD.org>2020-06-24 00:20:45 +0000
committerCy Schubert <cy@FreeBSD.org>2020-06-24 00:20:45 +0000
commit3914721463f70500ecc1f59312b122d8788465cf (patch)
treef253e72838d762e229ca71912a4a928e96cac2bd /ntpdate/ntpdate.c
parent5171bc9b11192d9ad273db7854787eaa65eb9997 (diff)
Notes
Diffstat (limited to 'ntpdate/ntpdate.c')
-rw-r--r--ntpdate/ntpdate.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/ntpdate/ntpdate.c b/ntpdate/ntpdate.c
index f6c5156ee20a..fd48604c912b 100644
--- a/ntpdate/ntpdate.c
+++ b/ntpdate/ntpdate.c
@@ -1984,7 +1984,7 @@ input_handler(void)
continue;
}
- rb = get_free_recv_buffer();
+ rb = get_free_recv_buffer(TRUE);
fromlen = sizeof(rb->recv_srcadr);
rb->recv_length = recvfrom(fdc, (char *)&rb->recv_pkt,
@@ -2013,7 +2013,7 @@ l_adj_systime(
l_fp *ts
)
{
- struct timeval adjtv, oadjtv;
+ struct timeval adjtv;
int isneg = 0;
l_fp offset;
#ifndef STEP_SLEW
@@ -2053,6 +2053,7 @@ l_adj_systime(
/* A time correction needs to be applied. */
#if !defined SYS_WINNT && !defined SYS_CYGWIN32
/* Slew the time on systems that support this. */
+ struct timeval oadjtv;
if (adjtime(&adjtv, &oadjtv) < 0) {
msyslog(LOG_ERR, "Can't adjust the time of day: %m");
exit(1);