Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1u2wEO-00834L-6D for pgsql-bugs@arkaria.postgresql.org; Thu, 10 Apr 2025 18:02:28 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.94.2) (envelope-from ) id 1u2wEM-00FbM4-B0 for pgsql-bugs@arkaria.postgresql.org; Thu, 10 Apr 2025 18:02:26 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1u2wEM-00FbLv-2O for pgsql-bugs@lists.postgresql.org; Thu, 10 Apr 2025 18:02:26 +0000 Received: from sss.pgh.pa.us ([68.162.161.243]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1u2wEK-004Yyt-0f for pgsql-bugs@lists.postgresql.org; Thu, 10 Apr 2025 18:02:26 +0000 Received: from sss1.sss.pgh.pa.us (localhost [127.0.0.1]) by sss.pgh.pa.us (8.15.2/8.15.2) with ESMTP id 53AI2Mfv537387; Thu, 10 Apr 2025 14:02:22 -0400 From: Tom Lane To: dan-eli@mail.ru cc: pgsql-bugs@lists.postgresql.org Subject: Re: BUG #18890: /src/timezone/localtime.c condition always false In-reply-to: <18890-ef0514797325c193@postgresql.org> References: <18890-ef0514797325c193@postgresql.org> Comments: In-reply-to PG Bug reporting form message dated "Thu, 10 Apr 2025 16:44:55 -0000" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <537385.1744308142.1@sss.pgh.pa.us> Date: Thu, 10 Apr 2025 14:02:22 -0400 Message-ID: <537386.1744308142@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk PG Bug reporting form 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