File 0003-zoneinfo-rename-isgmtcnt-to-isutcnt.patch of Package syslog-ng.12645

From 492eccfefe77234c4effe80980770e5082a23d5c Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?L=C3=A1szl=C3=B3=20V=C3=A1rady?= <laszlo.varady@balabit.com>
Date: Sat, 31 Aug 2019 00:33:46 +0200
Subject: [PATCH 3/4] zoneinfo: rename isgmtcnt to isutcnt
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

Based on tzcode 2019b.

Signed-off-by: László Várady <laszlo.varady@balabit.com>
(cherry picked from commit 67c7c7333cf8c6ae009b8488aacff01864e1ce9f)
---
 lib/timeutils.c | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)

diff --git a/lib/timeutils.c b/lib/timeutils.c
index 42d0d0c6e..d8ce3ae3f 100644
--- a/lib/timeutils.c
+++ b/lib/timeutils.c
@@ -560,7 +560,7 @@ zone_info_parser(unsigned char **input, gboolean is64bitData, gint *version)
   gint64 *transition_times = NULL;
   guint8 *transition_types = NULL;
   gint32 *gmt_offsets = NULL;
-  gint64 isgmtcnt, isstdcnt, leapcnt, timecnt, typecnt, charcnt;
+  gint64 isutcnt, isstdcnt, leapcnt, timecnt, typecnt, charcnt;
   gboolean insertInitial = FALSE;
 
   buf = *input;
@@ -599,7 +599,7 @@ zone_info_parser(unsigned char **input, gboolean is64bitData, gint *version)
   *input += 15;
 
   /* Read array sizes */
-  isgmtcnt = readcoded32(input, 0, G_MAXINT64);
+  isutcnt  = readcoded32(input, 0, G_MAXINT64);
   isstdcnt = readcoded32(input, 0, G_MAXINT64);
   leapcnt  = readcoded32(input, 0, G_MAXINT64);
   timecnt  = readcoded32(input, 0, G_MAXINT64);
@@ -612,11 +612,11 @@ zone_info_parser(unsigned char **input, gboolean is64bitData, gint *version)
    * should hold unless the zic source changes.
    */
 
-  if (isgmtcnt != typecnt ||
+  if (isutcnt != typecnt ||
       isstdcnt != typecnt)
     {
       msg_warning("Error in the time zone file",
-                  evt_tag_str("message", "Count mismatch between tzh_ttisgmtcnt, tzh_ttisstdcnt, tzh_typecnt"));
+                  evt_tag_str("message", "Count mismatch between tzh_ttisutcnt, tzh_ttisstdcnt, tzh_typecnt"));
     }
 
   /*
@@ -656,7 +656,7 @@ zone_info_parser(unsigned char **input, gboolean is64bitData, gint *version)
       transition_types[i] = t;
     }
 
-  /* Read types (except for the isstd and isgmt flags, which come later (why??)) */
+  /* Read types (except for the isstd and isut flags, which come later (why??)) */
   for (i = 0; i<typecnt; ++i)
     {
       gint offs = 24;
@@ -782,7 +782,7 @@ zone_info_parser(unsigned char **input, gboolean is64bitData, gint *version)
   for (i=0; i<typecnt; i++)
     readbool(input);
 
-  /* Ignore isgmt flags */
+  /* Ignore isut flags */
   for (i=0; i<typecnt; i++)
     readbool(input);
 
-- 
2.16.4

openSUSE Build Service is sponsored by