unofficial mirror of libc-alpha@sourceware.org
 help / color / mirror / Atom feed
* Update timezone code from tzcode 2018i
@ 2018-12-31 23:23 Joseph Myers
  2018-12-31 23:38 ` Paul Eggert
  0 siblings, 1 reply; 2+ messages in thread
From: Joseph Myers @ 2018-12-31 23:23 UTC (permalink / raw
  To: libc-alpha

This patch updates files coming from tzcode to the versions in tzcode
2018i.  No changes elsewhere in glibc were needed.

Tested for x86_64.

2018-12-31  Joseph Myers  <joseph@codesourcery.com>

	* timezone/zdump.c: Update from tzcode 2018i.
	* timezone/zic.c: Likewise.

diff --git a/timezone/zdump.c b/timezone/zdump.c
index 608f288691..0fc8ced96a 100644
--- a/timezone/zdump.c
+++ b/timezone/zdump.c
@@ -807,8 +807,10 @@ my_snprintf(char *s, size_t size, char const *format, ...)
     arglen = strlen(arg);
   } else {
     n = vsprintf(buf, format, args);
-    if (n < 0)
+    if (n < 0) {
+      va_end(args);
       return n;
+    }
     arg = buf;
     arglen = n;
   }
diff --git a/timezone/zic.c b/timezone/zic.c
index cb1bf28bfb..2ebc66a9af 100644
--- a/timezone/zic.c
+++ b/timezone/zic.c
@@ -2741,7 +2741,7 @@ error(_("can't determine time zone abbreviation to use just after until time"));
 			if (attypes[i].at > lastat->at)
 				lastat = &attypes[i];
 		if (lastat->at < rpytime(&xr, max_year - 1)) {
-			addtt(rpytime(&xr, max_year + 1), typecnt-1);
+			addtt(rpytime(&xr, max_year + 1), lastat->type);
 			attypes[timecnt - 1].dontmerge = true;
 		}
 	}
@@ -2945,7 +2945,7 @@ lowerit(char a)
 }
 
 /* case-insensitive equality */
-static bool
+static ATTRIBUTE_PURE bool
 ciequal(register const char *ap, register const char *bp)
 {
 	while (lowerit(*ap) == lowerit(*bp++))
@@ -2954,7 +2954,7 @@ ciequal(register const char *ap, register const char *bp)
 	return false;
 }
 
-static bool
+static ATTRIBUTE_PURE bool
 itsabbr(register const char *abbr, register const char *word)
 {
 	if (lowerit(*abbr) != lowerit(*word))
@@ -2970,7 +2970,7 @@ itsabbr(register const char *abbr, register const char *word)
 
 /* Return true if ABBR is an initial prefix of WORD, ignoring ASCII case.  */
 
-static bool
+static ATTRIBUTE_PURE bool
 ciprefix(char const *abbr, char const *word)
 {
   do

-- 
Joseph S. Myers
joseph@codesourcery.com

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: Update timezone code from tzcode 2018i
  2018-12-31 23:23 Update timezone code from tzcode 2018i Joseph Myers
@ 2018-12-31 23:38 ` Paul Eggert
  0 siblings, 0 replies; 2+ messages in thread
From: Paul Eggert @ 2018-12-31 23:38 UTC (permalink / raw
  To: Joseph Myers, libc-alpha

Thanks, please install.

That patch fixes a zic bug where it generates an incorrect transition for 
TZ='Africa/Casablanca' predicted for the year 2440, but I doubt whether this is 
worth mentioning in NEWS as Morocco will surely change its DST rules sometime in 
the next three centuries or so anyway.

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2018-12-31 23:38 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-12-31 23:23 Update timezone code from tzcode 2018i Joseph Myers
2018-12-31 23:38 ` Paul Eggert

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).