[PATCH 21/59] Document assumption that NO_DST == 0

Paul Eggert eggert@cs.ucla.edu
Sun Jan 5 05:56:56 GMT 2025


* time/tzset.c (__tzset_parse_tz): Document assumption that
NO_DST is zero here, just as it is already documentted in
tzset_internal.  This does not change the generated code
when optimizing.
---
 time/tzset.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/time/tzset.c b/time/tzset.c
index e001a5898c..a198b180eb 100644
--- a/time/tzset.c
+++ b/time/tzset.c
@@ -354,6 +354,8 @@ __tzset_parse_tz (const char *tz)
 {
   /* Clear out old state and reset to unnamed UTC.  */
   memset (tz_rules, '\0', sizeof tz_rules);
+  if (NO_DST != 0)
+    tz_rules[0].type = tz_rules[1].type = NO_DST;
   tz_rules[0].name = tz_rules[1].name = "";
 
   /* Get the standard time zone abbreviations.  */
-- 
2.45.2



More information about the Libc-alpha mailing list