Message ID | 20250105055750.1668721-51-eggert@cs.ucla.edu (mailing list archive) |
---|---|
State | New |
Headers |
Return-Path: <libc-alpha-bounces~patchwork=sourceware.org@sourceware.org> X-Original-To: patchwork@sourceware.org Delivered-To: patchwork@sourceware.org Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id DDB823858C54 for <patchwork@sourceware.org>; Sun, 5 Jan 2025 06:37:55 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org DDB823858C54 Authentication-Results: sourceware.org; dkim=pass (2048-bit key, unprotected) header.d=cs.ucla.edu header.i=@cs.ucla.edu header.a=rsa-sha256 header.s=9D0B346E-2AEB-11ED-9476-E14B719DCE6C header.b=m7uIThQt X-Original-To: libc-alpha@sourceware.org Delivered-To: libc-alpha@sourceware.org Received: from mail.cs.ucla.edu (mail.cs.ucla.edu [131.179.128.66]) by sourceware.org (Postfix) with ESMTPS id 29AEF385841F for <libc-alpha@sourceware.org>; Sun, 5 Jan 2025 06:00:26 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 29AEF385841F Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=cs.ucla.edu Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=cs.ucla.edu ARC-Filter: OpenARC Filter v1.0.0 sourceware.org 29AEF385841F Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=131.179.128.66 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1736056826; cv=none; b=AEpeYysXJzFBASryfgeklLwT7BRBr0ODnEJ9PEH2+RRdbTBquxiYGcEc0QbKg8mLMpEiYgmFWrZ1c4k/d79mt1Rm3rBjxssPRz+UlDOo1A/oE0P5f6zDQWP9sRa8+KHXagcLZ+acVNdpxM3WSffG6ivQ61/J+EZZz7p9gikLpTg= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1736056826; c=relaxed/simple; bh=htNjsnRR6BBAZJ5tFNIxu0WO8LPXqzCp7X58qAqAa7U=; h=DKIM-Signature:From:To:Subject:Date:Message-ID:MIME-Version; b=IukPgQp2B1EyrnbWAvWGI8ApVn3fP/m6R3ki1FL8k+b3LU2ipLAPSTzVPLg7vLXESRMznUViXh0wgVrslbtYJ0hAEcGUt9o0xsFgwLjiOtsLWa2JS4TTe0Ip5jqzEb6cdZNt0+kaPHn3k+Q3FE7JzoamC10loQSLBalw0jZY5l0= ARC-Authentication-Results: i=1; server2.sourceware.org DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 29AEF385841F Received: from localhost (localhost [127.0.0.1]) by mail.cs.ucla.edu (Postfix) with ESMTP id A3B4B3C123847 for <libc-alpha@sourceware.org>; Sat, 4 Jan 2025 22:00:25 -0800 (PST) Received: from mail.cs.ucla.edu ([127.0.0.1]) by localhost (mail.cs.ucla.edu [127.0.0.1]) (amavis, port 10032) with ESMTP id ngtpJJ6lJhr6; Sat, 4 Jan 2025 22:00:24 -0800 (PST) Received: from localhost (localhost [127.0.0.1]) by mail.cs.ucla.edu (Postfix) with ESMTP id 056C23C123843; Sat, 4 Jan 2025 22:00:24 -0800 (PST) DKIM-Filter: OpenDKIM Filter v2.10.3 mail.cs.ucla.edu 056C23C123843 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cs.ucla.edu; s=9D0B346E-2AEB-11ED-9476-E14B719DCE6C; t=1736056824; bh=pMLpxWQzIDUrj7JvIw6wfQBFFDSDZVRgp4Gy92rvvgI=; h=From:To:Date:Message-ID:MIME-Version; b=m7uIThQtXshopEgDCK6WGD11H7i+DTic5iahI+89uIfSolVUfKfmrPHTzK8RFWT0H G7qTVmG9BtvqnMqevW/oIaYmxG5LGMNUOxW3DEoUb+cRNNeRZYG/K9KygMtGBsbkiy dVLQeyu54hxpXzSU6s5e/OHQm57w7t62kaaa1upLiiY/1IEbHNsN/l2kXvxjElKu6C 59GFCEhdP1VIoI7IdENPHbO42DhgL/pyuxuGpqx68twjoTB1ohpFA9oJcifuPACZ/J e5ThftPJxeaRaEKqBE3rHjf7VMSKzXqtJZFq/noRHjoWofE7mDw8P4aRX96ztp2tio MBpmp6gBIwi1A== X-Virus-Scanned: amavis at mail.cs.ucla.edu Received: from mail.cs.ucla.edu ([127.0.0.1]) by localhost (mail.cs.ucla.edu [127.0.0.1]) (amavis, port 10026) with ESMTP id 9mwHJhYxubyq; Sat, 4 Jan 2025 22:00:23 -0800 (PST) Received: from wing.home (unknown [47.154.28.214]) by mail.cs.ucla.edu (Postfix) with ESMTPSA id DE91B3C082EB9; Sat, 4 Jan 2025 22:00:23 -0800 (PST) From: Paul Eggert <eggert@cs.ucla.edu> To: libc-alpha@sourceware.org Cc: Paul Eggert <eggert@cs.ucla.edu> Subject: [PATCH 50/59] Remove use_last label from __tzfile_compute Date: Sat, 4 Jan 2025 21:57:25 -0800 Message-ID: <20250105055750.1668721-51-eggert@cs.ucla.edu> X-Mailer: git-send-email 2.45.2 In-Reply-To: <01207110-bd60-46ae-9c08-fb39c2011067@cs.ucla.edu> References: <01207110-bd60-46ae-9c08-fb39c2011067@cs.ucla.edu> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-Spam-Status: No, score=-10.7 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, GIT_PATCH_0, SPF_HELO_NONE, SPF_PASS, TXREP autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org X-BeenThere: libc-alpha@sourceware.org X-Mailman-Version: 2.1.30 Precedence: list List-Id: Libc-alpha mailing list <libc-alpha.sourceware.org> List-Unsubscribe: <https://sourceware.org/mailman/options/libc-alpha>, <mailto:libc-alpha-request@sourceware.org?subject=unsubscribe> List-Archive: <https://sourceware.org/pipermail/libc-alpha/> List-Post: <mailto:libc-alpha@sourceware.org> List-Help: <mailto:libc-alpha-request@sourceware.org?subject=help> List-Subscribe: <https://sourceware.org/mailman/listinfo/libc-alpha>, <mailto:libc-alpha-request@sourceware.org?subject=subscribe> Errors-To: libc-alpha-bounces~patchwork=sourceware.org@sourceware.org |
Series |
time: sync mktime from Gnulib
|
|
Checks
Context | Check | Description |
---|---|---|
redhat-pt-bot/TryBot-apply_patch | success | Patch applied to master at the time it was sent |
Commit Message
Paul Eggert
Jan. 5, 2025, 5:57 a.m. UTC
* time/tzfile.c (__tzfile_compute): Redo last-transition check so that there is no need for the use_last label or goto. --- time/tzfile.c | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-)
diff --git a/time/tzfile.c b/time/tzfile.c index e491df7d9f..8b5faad424 100644 --- a/time/tzfile.c +++ b/time/tzfile.c @@ -614,18 +614,16 @@ __tzfile_compute (__time64_t timer, int use_localtime, } else if (timecnt == 0 || timer >= transitions[timecnt - 1]) { - if (__glibc_unlikely (tzspec == NULL)) + /* TIMER is after the last transition. Do not use the TZ + string if it is absent or if we cannot convert to the + broken down structure. */ + if (__glibc_unlikely (tzspec == NULL) + || __glibc_unlikely (__offtime (timer, 0, 0, tp) == NULL)) { - use_last: i = timecnt; goto found; } - /* Convert to broken down structure. If this fails do not - use the string. */ - if (__glibc_unlikely (__offtime (timer, 0, 0, tp) == NULL)) - goto use_last; - /* Use the rules from the TZ string to compute the change. */ __tz_compute (timer, tp);