Do not bother to validate the obsolete standrd/wall and UT/local
indicators.  The code has not used them since 2026a.
* NEWS: Mention this.
* localtime.c (struct ttinfo): Remove tt_ttisstd and tt_ttisut
members.  All uses removed.
(tzloadbody): Don’t bother validating these obsolescent indicators.
---
 NEWS        |  5 +++++
 localtime.c | 31 +++----------------------------
 2 files changed, 8 insertions(+), 28 deletions(-)

diff --git a/NEWS b/NEWS
index 59ce1618..4f95684e 100644
--- a/NEWS
+++ b/NEWS
@@ -60,6 +60,11 @@ Unreleased, experimental changes
     when given TZif files holding some unlikely timezone histories.
     (Problem reported by David Sarkisyan.)
 
+    localtime-related functions no longer check the values of TZif
+    files’ standard/wall and UT/local indicators, which these
+    functions have not used since 2026c’s removal of the old
+    posixrules feature.
+
   Changes to documentation
 
     URLs for release tarballs in tz-link.html have been updated to
diff --git a/localtime.c b/localtime.c
index 7f41838f..3ffb02d1 100644
--- a/localtime.c
+++ b/localtime.c
@@ -475,8 +475,6 @@ struct ttinfo {                             /* time type 
information */
                                           -2**31 + 1 .. 2**31 - 1  */
        desigidx_type   tt_desigidx;    /* abbreviation list index */
        bool            tt_isdst;       /* used to set tm_isdst */
-       bool            tt_ttisstd;     /* transition is std time */
-       bool            tt_ttisut;      /* transition is UT */
 };
 
 struct lsinfo {                                /* leap second information */
@@ -639,8 +637,6 @@ init_ttinfo(struct ttinfo *s, int_fast32_t utoff, bool 
isdst,
   s->tt_utoff = utoff;
   s->tt_isdst = isdst;
   s->tt_desigidx = desigidx;
-  s->tt_ttisstd = false;
-  s->tt_ttisut = false;
 }
 
 /* Return true if SP's time type I does not specify local time.  */
@@ -1196,30 +1192,9 @@ tzloadbody(char const *name, struct state *sp, char 
tzloadflags,
                }
                set_leapcount(sp, leapcnt);
 
-               for (i = 0; i < sp->typecnt; ++i) {
-                       register struct ttinfo *        ttisp;
-
-                       ttisp = &sp->ttis[i];
-                       if (ttisstdcnt == 0)
-                               ttisp->tt_ttisstd = false;
-                       else {
-                               if (*p != true && *p != false)
-                                 return EFTYPE;
-                               ttisp->tt_ttisstd = *p++;
-                       }
-               }
-               for (i = 0; i < sp->typecnt; ++i) {
-                       register struct ttinfo *        ttisp;
-
-                       ttisp = &sp->ttis[i];
-                       if (ttisutcnt == 0)
-                               ttisp->tt_ttisut = false;
-                       else {
-                               if (*p != true && *p != false)
-                                               return EFTYPE;
-                               ttisp->tt_ttisut = *p++;
-                       }
-               }
+               /* Do not bother to validate standard/wall and UT/local
+                  indicators, as they are no longer used here.  */
+               p += ttisstdcnt + ttisutcnt;
            }
 
            nread -= p - up->buf;
-- 
2.55.0

Reply via email to