From patchwork Mon Dec 31 23:23:39 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Joseph Myers X-Patchwork-Id: 1019721 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (mailfrom) smtp.mailfrom=sourceware.org (client-ip=209.132.180.131; helo=sourceware.org; envelope-from=libc-alpha-return-98928-incoming=patchwork.ozlabs.org@sourceware.org; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=codesourcery.com Authentication-Results: ozlabs.org; dkim=pass (1024-bit key; secure) header.d=sourceware.org header.i=@sourceware.org header.b="YPSIV1bw"; dkim-atps=neutral Received: from sourceware.org (server1.sourceware.org [209.132.180.131]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 43TD076jF5z9rxp for ; Tue, 1 Jan 2019 10:23:51 +1100 (AEDT) DomainKey-Signature: a=rsa-sha1; c=nofws; d=sourceware.org; h=list-id :list-unsubscribe:list-subscribe:list-archive:list-post :list-help:sender:date:from:to:subject:message-id:mime-version :content-type; q=dns; s=default; b=E6BpLHB21kAyYMk9NesdYMTjqly+R cPDHXOD2BRuWpikjld5x3XobnguKv6vCNDBo3o/UlTUIpwQT/uS6cqKCIvAYZ4C4 cCPwldkfmN1243PwKTClKPPM1aP/iZyQZsBI+wZ3Sfrl7ZOOgI2IW0xBn9oVbE7p HO9rOrJH4SzO2Q= DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=sourceware.org; h=list-id :list-unsubscribe:list-subscribe:list-archive:list-post :list-help:sender:date:from:to:subject:message-id:mime-version :content-type; s=default; bh=AzOekSgC75OdN6g7K3aTiqKu/Kc=; b=YPS IV1bwfFRTOVxi1+wq/4v1WQRMraj/WcQkobUvQ8m05Sh3deEr9QBCTWBjbeanPph iNB1YrV7/q+zRXGVFMnKAqayc94WpRuAv1f/zbW42DfM2vYa+AbbQIjOWDS6MNSY oOvP4CWVhgoBzjupWdZXWDTFRJLPgyEsAhr8LAEI= Received: (qmail 77554 invoked by alias); 31 Dec 2018 23:23:46 -0000 Mailing-List: contact libc-alpha-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: libc-alpha-owner@sourceware.org Delivered-To: mailing list libc-alpha@sourceware.org Received: (qmail 77541 invoked by uid 89); 31 Dec 2018 23:23:45 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-26.9 required=5.0 tests=BAYES_00, GIT_PATCH_0, GIT_PATCH_1, GIT_PATCH_2, GIT_PATCH_3, RCVD_IN_DNSWL_NONE, SPF_PASS autolearn=ham version=3.3.2 spammy=zone X-HELO: relay1.mentorg.com Date: Mon, 31 Dec 2018 23:23:39 +0000 From: Joseph Myers To: Subject: Update timezone code from tzcode 2018i Message-ID: User-Agent: Alpine 2.21 (DEB 202 2017-01-01) MIME-Version: 1.0 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 * 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