[Git][NTPsec/ntpsec][master] ntp_set_tod() was always called with a second arg of null...
Eric S. Raymond
gitlab at mg.gitlab.com
Tue Dec 8 23:27:38 UTC 2015
Eric S. Raymond pushed to branch master at NTPsec / ntpsec
Commits:
aa451fd8 by Eric S. Raymond at 2015-12-08T18:26:09Z
ntp_set_tod() was always called with a second arg of null...
...so eliminate that argument.
- - - - -
4 changed files:
- include/ntp_machine.h
- libntp/machines.c
- libntp/systime.c
- ports/winnt/libntp/SetSystemTime.c
Changes:
=====================================
include/ntp_machine.h
=====================================
--- a/include/ntp_machine.h
+++ b/include/ntp_machine.h
@@ -15,7 +15,7 @@
#include "ntp_proto.h"
-int ntp_set_tod (struct timespec *tvs, void *tzp);
+int ntp_set_tod (struct timespec *tvs);
#ifdef NO_MAIN_ALLOWED
/* we have no main routines so lets make a plan */
=====================================
libntp/machines.c
=====================================
--- a/libntp/machines.c
+++ b/libntp/machines.c
@@ -64,8 +64,7 @@ pset_tod_using set_tod_using = NULL;
int
ntp_set_tod(
- struct timespec *tvs,
- void *tzp
+ struct timespec *tvs
)
{
static int tod;
@@ -101,7 +100,7 @@ ntp_set_tod(
adjtv.tv_sec = tvs->tv_sec;
adjtv.tv_usec = (tvs->tv_nsec + 500) / 1000;
- rc = settimeofday(&adjtv, tzp);
+ rc = settimeofday(&adjtv, NULL);
saved_errno = errno;
TRACE(1, ("ntp_set_tod: settimeofday: %d %m\n", rc));
if (!tod && !rc)
=====================================
libntp/systime.c
=====================================
--- a/libntp/systime.c
+++ b/libntp/systime.c
@@ -460,7 +460,7 @@ step_systime(
timets = lfp_stamp_to_tspec(fp_sys, &pivot);
/* now set new system time */
- if (ntp_set_tod(&timets, NULL) != 0) {
+ if (ntp_set_tod(&timets) != 0) {
msyslog(LOG_ERR, "step-systime: %m");
return false;
}
=====================================
ports/winnt/libntp/SetSystemTime.c
=====================================
--- a/ports/winnt/libntp/SetSystemTime.c
+++ b/ports/winnt/libntp/SetSystemTime.c
@@ -9,8 +9,7 @@ pset_tod_using set_tod_using = NULL;
int
ntp_set_tod(
- struct timespec *tp,
- void *tzp
+ struct timespec *tp
)
{
SYSTEMTIME st;
@@ -19,8 +18,6 @@ ntp_set_tod(
ULONGLONG ull;
} t;
- UNUSED_ARG(tzp);
-
t.ull = FILETIME_1970 +
(ULONGLONG)tv->tv_sec * 10 * 1000 * 1000 +
(ULONGLONG)tv->tv_nsec / 100;
View it on GitLab: https://gitlab.com/NTPsec/ntpsec/commit/aa451fd8998042a6b0c2668eae63f435939c4860
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.ntpsec.org/pipermail/vc/attachments/20151208/d722f32e/attachment.html>
More information about the vc
mailing list