pg.ddx.io  pgsql-committers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Michael Paquier <michael@paquier.xyz>
To: pgsql-committers@lists.postgresql.org
Subject: pgsql: Clean up some code using "(expr) ? true : false"
Date: Wed, 08 Sep 2021 01:00:37 +0000
Message-ID: <E1mNlx7-0000XV-Gf@gemulon.postgresql.org> (raw)

Clean up some code using "(expr) ? true : false"

All the code paths simplified here were already using a boolean or used
an expression that led to zero or one, making the extra bits
unnecessary.

Author: Justin Pryzby
Reviewed-by: Tom Lane, Michael Paquier, Peter Smith
Discussion: https://postgr.es/m/20210428182936.GE27406@telsasoft.com

Branch
------
master

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

Modified Files
--------------
contrib/intarray/_int_tool.c                | 2 +-
contrib/ltree/ltree_gist.c                  | 2 +-
contrib/sepgsql/selinux.c                   | 2 +-
src/backend/access/gin/gindatapage.c        | 2 +-
src/backend/access/gin/ginutil.c            | 2 +-
src/backend/access/gist/gistsplit.c         | 4 ++--
src/backend/access/hash/hash.c              | 2 +-
src/backend/access/hash/hashinsert.c        | 2 +-
src/backend/access/hash/hashovfl.c          | 2 +-
src/backend/access/hash/hashpage.c          | 2 +-
src/backend/access/heap/heapam_visibility.c | 2 +-
src/backend/executor/spi.c                  | 2 +-
src/backend/jit/jit.c                       | 2 +-
src/backend/optimizer/util/pathnode.c       | 4 ++--
src/backend/statistics/mcv.c                | 2 +-
src/backend/storage/file/buffile.c          | 2 +-
src/backend/tsearch/ts_parse.c              | 2 +-
src/backend/utils/adt/bool.c                | 2 +-
src/backend/utils/adt/ruleutils.c           | 4 ++--
src/backend/utils/adt/tsquery_gist.c        | 2 +-
src/backend/utils/adt/tsquery_util.c        | 2 +-
src/backend/utils/fmgr/dfmgr.c              | 2 +-
22 files changed, 25 insertions(+), 25 deletions(-)



Message-ID: <E1mNlx7-0000XV-Gf@gemulon.postgresql.org>
Permalink:  ../E1mNlx7-0000XV-Gf@gemulon.postgresql.org/
Also on:    postgresql.org/message-id/E1mNlx7-0000XV-Gf@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: michael@paquier.xyz
  Subject: Re: pgsql: Clean up some code using "(expr) ? true : false"
  In-Reply-To: <E1mNlx7-0000XV-Gf@gemulon.postgresql.org>
  References: <E1mNlx7-0000XV-Gf@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