Update offset correction errors only when needed

This commit is contained in:
Miroslav Lichvar
2010-08-11 17:16:16 +02:00
parent fa84496423
commit 1faeb45063
5 changed files with 13 additions and 12 deletions

View File

@@ -349,13 +349,8 @@ LCL_CookTime(struct timeval *raw, struct timeval *cooked, double *err)
void
LCL_GetOffsetCorrection(struct timeval *raw, double *correction, double *err)
{
double e;
/* Call system specific driver to get correction */
(*drv_offset_convert)(raw, correction, &e);
if (err)
*err = e;
(*drv_offset_convert)(raw, correction, err);
}
/* ================================================== */