Re: BUG #18993: [BUG] Unreachable code in pg_next_dst_boundary() - Mailing list pgsql-bugs

From Nathan Bossart
Subject Re: BUG #18993: [BUG] Unreachable code in pg_next_dst_boundary()
Date
Msg-id aH5OzOYbypP8QFKv@nathan
Whole thread Raw
In response to BUG #18993: [BUG] Unreachable code in pg_next_dst_boundary()  (PG Bug reporting form <noreply@postgresql.org>)
Responses Re: BUG #18993: [BUG] Unreachable code in pg_next_dst_boundary()
List pgsql-bugs
On Mon, Jul 21, 2025 at 12:29:16PM +0000, PG Bug reporting form wrote:
> In pg_next_dst_boundary() (src/timezone/localtime.c), the following
> condition can never be true:
> ```
> if (tcycles - icycles >= 1 || icycles - tcycles >= 1)
>     return -1;
> ```
> This is unreachable because icycles is assigned directly from tcycles.

I see the following upstream commit and discussion related to this:

    https://github.com/eggert/tz/commit/b0bf6d8
    https://mm.icann.org/pipermail/tz/2013-August/019493.html

-- 
nathan



pgsql-bugs by date:

Previous
From: PG Bug reporting form
Date:
Subject: BUG #18993: [BUG] Unreachable code in pg_next_dst_boundary()
Next
From: Tom Lane
Date:
Subject: Re: BUG #18993: [BUG] Unreachable code in pg_next_dst_boundary()