pg.ddx.io  pgsql-committers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: John Naylor <john.naylor@postgresql.org>
To: pgsql-committers@lists.postgresql.org
Subject: pgsql: Remove dead code in formatting.c
Date: Tue, 17 Jan 2023 07:11:49 +0000
Message-ID: <E1pHg8L-0045cf-61@gemulon.postgresql.org> (raw)

Remove dead code in formatting.c

Remove some code guarded by IS_MINUS() or IS_PLUS(), where the entire
stanza is inside an else-block where both of these are false. This
should slightly improve test coverage.

While at it, remove coding that apparently assumes that unsetting a
bit is so expensive that we have to first check if it's already set
in the first place.

Per Coverity report from Ranier Vilela
Analysis and review by Justin Pryzby

Discussion: https://www.postgresql.org/message-id/20221223010818.GP1153%40telsasoft.com

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/e29c5653434ebf6a88d009746d21ca3a59ddb69b

Modified Files
--------------
src/backend/utils/adt/formatting.c | 6 +-----
1 file changed, 1 insertion(+), 5 deletions(-)



Message-ID: <E1pHg8L-0045cf-61@gemulon.postgresql.org>
Permalink:  ../E1pHg8L-0045cf-61@gemulon.postgresql.org/
Also on:    postgresql.org/message-id/E1pHg8L-0045cf-61@gemulon.postgresql.org

 · 

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 from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-committers@postgresql.org
  Cc: john.naylor@postgresql.org
  Subject: Re: pgsql: Remove dead code in formatting.c
  In-Reply-To: <E1pHg8L-0045cf-61@gemulon.postgresql.org>
  References: <E1pHg8L-0045cf-61@gemulon.postgresql.org>

* 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