Message ID | 20250105055750.1668721-56-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 707593858C78 for <patchwork@sourceware.org>; Sun, 5 Jan 2025 06:22:10 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 707593858C78 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=d9dCfVm8 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 EB74F3858288 for <libc-alpha@sourceware.org>; Sun, 5 Jan 2025 06:00:37 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org EB74F3858288 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 EB74F3858288 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=1736056838; cv=none; b=PmHDUsXja2TuSgwBO2cTv1+Cpmyr4N2ORf1DKrnwYpF5jCNJrfOmwni1TjdtfLGnfZjM2hcjKobh71CVqZY5qQdQWKeBwfLQpPcOaSUABEH1yajKfmcfgOy9HMj/q7JJ/TlH89bIhzip5DBizN4K90jZuJBnlIgsx/bzoGvEAv8= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1736056838; c=relaxed/simple; bh=5kNEy2JbDoKXoRQ+0aWejo9Z7qxLTmgo+JxKiDeW5XE=; h=DKIM-Signature:From:To:Subject:Date:Message-ID:MIME-Version; b=PrCrx45SdY6BlzZlQ7m2Q+Pf7K9JHAAAbTgcD7nYWrW3EPPAjRA8UxtuS5J9ZTCfPhJIpi3Gx7Xve0+6/ipTZDQRZremGDcvoh7N2+cTj746o6qhTbGntCv2pYW1vflSNBol1MBgse4zcUsVjNVMEtxDe2MEpFz8pfr72yt+paM= ARC-Authentication-Results: i=1; server2.sourceware.org DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org EB74F3858288 Received: from localhost (localhost [127.0.0.1]) by mail.cs.ucla.edu (Postfix) with ESMTP id 714893C123844 for <libc-alpha@sourceware.org>; Sat, 4 Jan 2025 22:00:37 -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 hO3Baeu9rpsg; Sat, 4 Jan 2025 22:00:37 -0800 (PST) Received: from localhost (localhost [127.0.0.1]) by mail.cs.ucla.edu (Postfix) with ESMTP id 35D1B3C082EB9; Sat, 4 Jan 2025 22:00:37 -0800 (PST) DKIM-Filter: OpenDKIM Filter v2.10.3 mail.cs.ucla.edu 35D1B3C082EB9 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cs.ucla.edu; s=9D0B346E-2AEB-11ED-9476-E14B719DCE6C; t=1736056837; bh=SLkO5GW0G9tX7FbuXDnqknC3UK8vky4isX2CV53E3vs=; h=From:To:Date:Message-ID:MIME-Version; b=d9dCfVm8l9a/7gXkk1n+9eB6n8LKi2O++Cf2KCcDq9UbCxO4o/nMpvJdz4M/JBKsj sVyKjlbK3+XW/BhlMceGGFeIMHf13q0oFMlRcfBJMkMI4qt8D8m+xtiZ95hTByVs7g wIF0hK9PjFYk9b2o1Rrcj7JPadJcO8LuXaiAy5CVkBmrR0yX1HACZn3hK2QeRWXzku aQVjuD0qKOyI+721rQBQTzLBwPdgY14IKlDa5iig09N0z8boFxoHi8PnY8M7US6166 sifpFUyXLpxiOV3UY1FMqd3XWZr4ntOVdKJiVSrFuQ/8NCkARPIWnCFEL8DYt/oetD /SZg90SknMWRA== 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 JDzkA_0YCqAr; Sat, 4 Jan 2025 22:00:37 -0800 (PST) Received: from wing.home (unknown [47.154.28.214]) by mail.cs.ucla.edu (Postfix) with ESMTPSA id 1DA833C082EB5; Sat, 4 Jan 2025 22:00:37 -0800 (PST) From: Paul Eggert <eggert@cs.ucla.edu> To: libc-alpha@sourceware.org Cc: Paul Eggert <eggert@cs.ucla.edu> Subject: [PATCH 55/59] Refactor __tzfile_compute index local Date: Sat, 4 Jan 2025 21:57:30 -0800 Message-ID: <20250105055750.1668721-56-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): Avoid portmanteau index local. --- time/tzfile.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-)
diff --git a/time/tzfile.c b/time/tzfile.c index 0ee70fd356..bed62d877f 100644 --- a/time/tzfile.c +++ b/time/tzfile.c @@ -643,12 +643,10 @@ __tzfile_compute (__time64_t timer, int use_localtime, int *leap_correct, bool *leap_hit, struct tm *tp) { - tzidx i; - /* Find the last leap second correction transition time before TIMER. */ int corr = 0; bool hit = false; - for (i = leapcnt; 0 < i; ) + for (tzidx i = leapcnt; 0 < i; ) { i--; if (leaps[i].occur <= timer) @@ -679,7 +677,7 @@ __tzfile_compute (__time64_t timer, int use_localtime, } else { - i = first_transition_after (timer); + tzidx i = first_transition_after (timer); if (i == timecnt) { /* TIMER is after the last transition, or there are no transitions