]> git.ipfire.org Git - thirdparty/chrony.git/commitdiff
reference: move static tz variables to function using them
authorMiroslav Lichvar <mlichvar@redhat.com>
Thu, 29 Jun 2017 10:39:42 +0000 (12:39 +0200)
committerMiroslav Lichvar <mlichvar@redhat.com>
Fri, 30 Jun 2017 11:43:35 +0000 (13:43 +0200)
reference.c

index ead3502c01261b57efcd7fba0739bf2dab91cc8f..d5c049f0d8744c816ce1e1635c2487fd9234af9a 100644 (file)
@@ -111,8 +111,6 @@ static SCH_TimeoutID leap_timeout_id;
 
 /* Name of a system timezone containing leap seconds occuring at midnight */
 static char *leap_tzname;
-static time_t last_tz_leap_check;
-static NTP_Leap tz_leap;
 
 /* ================================================== */
 
@@ -617,6 +615,8 @@ is_leap_second_day(struct tm *stm) {
 static NTP_Leap
 get_tz_leap(time_t when)
 {
+  static time_t last_tz_leap_check;
+  static NTP_Leap tz_leap;
   struct tm stm;
   time_t t;
   char *tz_env, tz_orig[128];