pg.ddx.io  pgsql-bugs@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: dan-eli@mail.ru
Cc: pgsql-bugs@lists.postgresql.org
Subject: Re: BUG #18890: /src/timezone/localtime.c condition always false
Date: Thu, 10 Apr 2025 14:02:22 -0400
Message-ID: <537386.1744308142@sss.pgh.pa.us> (raw)
In-Reply-To: <18890-ef0514797325c193@postgresql.org>
References: <18890-ef0514797325c193@postgresql.org>

PG Bug reporting form <noreply@postgresql.org> writes:
> On line 223 there is a check of string 'name' and in this case it is
> initiallized and then is being checked for null once more with no reason.

This code is taken from the upstream tzcode distribution, in which
TZDEFAULT can be NULL.  (Or so I assume anyway without having looked.)
I'm disinclined to diverge from their code just to satisfy some static
analyzer complaining about useless code --- any reasonable C compiler
will discard that code, so it's not a problem.

> The code becomes quite buggy.

If there is actually a bug here, I'm not seeing it.

			regards, tom lane





view thread (2+ messages)

Message-ID: <537386.1744308142@sss.pgh.pa.us>
Permalink:  ../537386.1744308142@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/537386.1744308142@sss.pgh.pa.us

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-bugs@postgresql.org
  Cc: tgl@sss.pgh.pa.us, dan-eli@mail.ru, pgsql-bugs@lists.postgresql.org
  Subject: Re: BUG #18890: /src/timezone/localtime.c condition always false
  In-Reply-To: <537386.1744308142@sss.pgh.pa.us>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox