]> git.ipfire.org Git - thirdparty/chrony.git/commitdiff
sys_timex: rename status variable
authorMiroslav Lichvar <mlichvar@redhat.com>
Mon, 10 Jul 2017 12:48:47 +0000 (14:48 +0200)
committerMiroslav Lichvar <mlichvar@redhat.com>
Mon, 10 Jul 2017 12:48:47 +0000 (14:48 +0200)
sys_timex.c

index 815779e9ad9f358c132e307b5d3186cf23a856f4..f41dcc9813c3b40efbd2b60f771770ae19ab5ef5 100644 (file)
@@ -61,7 +61,7 @@
 #define MIN_TICK_RATE 100
 
 /* Saved timex status */
-static int status;
+static int sys_status;
 
 /* ================================================== */
 
@@ -103,16 +103,16 @@ set_leap(int leap, int tai_offset)
   txc.modes = 0;
   applied = SYS_Timex_Adjust(&txc, 0) == TIME_WAIT;
 
-  prev_status = status;
-  status &= ~(STA_INS | STA_DEL);
+  prev_status = sys_status;
+  sys_status &= ~(STA_INS | STA_DEL);
 
   if (leap > 0)
-    status |= STA_INS;
+    sys_status |= STA_INS;
   else if (leap < 0)
-    status |= STA_DEL;
+    sys_status |= STA_DEL;
 
   txc.modes = MOD_STATUS;
-  txc.status = status;
+  txc.status = sys_status;
 
 #ifdef MOD_TAI
   if (tai_offset && tai_offset != txc.tai) {
@@ -124,7 +124,7 @@ set_leap(int leap, int tai_offset)
 
   SYS_Timex_Adjust(&txc, 0);
 
-  if (prev_status != status) {
+  if (prev_status != sys_status) {
     LOG(LOGS_INFO, "System clock status %s leap second",
         leap ? (leap > 0 ? "set to insert" : "set to delete") :
         (applied ? "reset after" : "set to not insert/delete"));
@@ -156,12 +156,12 @@ set_sync_status(int synchronised, double est_error, double max_error)
 #endif
 
   if (synchronised)
-    status &= ~STA_UNSYNC;
+    sys_status &= ~STA_UNSYNC;
   else
-    status |= STA_UNSYNC;
+    sys_status |= STA_UNSYNC;
 
   txc.modes = MOD_STATUS | MOD_ESTERROR | MOD_MAXERROR;
-  txc.status = status;
+  txc.status = sys_status;
   txc.esterror = est_error * 1.0e6;
   txc.maxerror = max_error * 1.0e6;
 
@@ -176,17 +176,17 @@ initialise_timex(void)
 {
   struct timex txc;
 
-  status = STA_UNSYNC;
+  sys_status = STA_UNSYNC;
 
   /* Reset PLL offset */
   txc.modes = MOD_OFFSET | MOD_STATUS;
-  txc.status = STA_PLL | status;
+  txc.status = STA_PLL | sys_status;
   txc.offset = 0;
   SYS_Timex_Adjust(&txc, 0);
 
   /* Turn PLL off */
   txc.modes = MOD_STATUS;
-  txc.status = status;
+  txc.status = sys_status;
   SYS_Timex_Adjust(&txc, 0);
 }