mirror of
https://gitlab.com/chrony/chrony.git
synced 2025-12-03 17:45:07 -05:00
Don't use timezone parameter in gettimeofday and settimeofday calls
This commit is contained in:
@@ -94,13 +94,12 @@ static void
|
||||
clock_initialise(void)
|
||||
{
|
||||
struct timeval newadj, oldadj;
|
||||
struct timezone tz;
|
||||
|
||||
offset_register = 0.0;
|
||||
adjustment_requested = 0.0;
|
||||
current_freq = 0.0;
|
||||
|
||||
if (gettimeofday(&T0, &tz) < 0) {
|
||||
if (gettimeofday(&T0, NULL) < 0) {
|
||||
LOG_FATAL(LOGF_SysSolaris, "gettimeofday() failed");
|
||||
}
|
||||
|
||||
@@ -135,7 +134,6 @@ start_adjust(void)
|
||||
{
|
||||
struct timeval newadj, oldadj;
|
||||
struct timeval T1;
|
||||
struct timezone tz;
|
||||
double elapsed, accrued_error;
|
||||
double adjust_required;
|
||||
struct timeval exact_newadj;
|
||||
@@ -143,7 +141,7 @@ start_adjust(void)
|
||||
double old_adjust_remaining;
|
||||
|
||||
/* Determine the amount of error built up since the last adjustment */
|
||||
if (gettimeofday(&T1, &tz) < 0) {
|
||||
if (gettimeofday(&T1, NULL) < 0) {
|
||||
LOG_FATAL(LOGF_SysSolaris, "gettimeofday() failed");
|
||||
}
|
||||
|
||||
@@ -182,7 +180,6 @@ static void
|
||||
stop_adjust(void)
|
||||
{
|
||||
struct timeval T1;
|
||||
struct timezone tz;
|
||||
struct timeval zeroadj, remadj;
|
||||
double adjustment_remaining, adjustment_achieved;
|
||||
double elapsed, elapsed_plus_adjust;
|
||||
@@ -194,7 +191,7 @@ stop_adjust(void)
|
||||
LOG_FATAL(LOGF_SysSolaris, "adjtime() failed");
|
||||
}
|
||||
|
||||
if (gettimeofday(&T1, &tz) < 0) {
|
||||
if (gettimeofday(&T1, NULL) < 0) {
|
||||
LOG_FATAL(LOGF_SysSolaris, "gettimeofday() failed");
|
||||
}
|
||||
|
||||
@@ -235,10 +232,9 @@ apply_step_offset(double offset)
|
||||
{
|
||||
struct timeval old_time, new_time, rounded_new_time, T1;
|
||||
double rounding_error;
|
||||
struct timezone tz;
|
||||
|
||||
stop_adjust();
|
||||
if (gettimeofday(&old_time, &tz) < 0) {
|
||||
if (gettimeofday(&old_time, NULL) < 0) {
|
||||
LOG_FATAL(LOGF_SysSolaris, "gettimeofday() failed");
|
||||
}
|
||||
|
||||
@@ -259,7 +255,7 @@ apply_step_offset(double offset)
|
||||
|
||||
UTI_DiffTimevalsToDouble(&rounding_error, &rounded_new_time, &new_time);
|
||||
|
||||
if (settimeofday(&new_time, &tz) < 0) {
|
||||
if (settimeofday(&new_time, NULL) < 0) {
|
||||
LOG_FATAL(LOGF_SysSolaris, "settimeofday() failed");
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user