Don't use timezone parameter in gettimeofday and settimeofday calls

This commit is contained in:
Miroslav Lichvar
2010-08-12 14:43:26 +02:00
parent 6b0198c2d7
commit 2f2e524bc6
7 changed files with 28 additions and 51 deletions

View File

@@ -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");
}