pg.ddx.io  pgsql-committers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Peter Eisentraut <peter@eisentraut.org>
To: pgsql-committers@lists.postgresql.org
Subject: pgsql: Remove redundant null pointer checks before PQclear and PQconnin
Date: Sun, 03 Jul 2022 18:23:01 +0000
Message-ID: <E1o84FH-0012Ja-NT@gemulon.postgresql.org> (raw)

Remove redundant null pointer checks before PQclear and PQconninfoFree

These functions already had the free()-like behavior of handling null
pointers as a no-op.  But it wasn't documented, so add it explicitly
to the documentation, too.

Discussion: https://www.postgresql.org/message-id/flat/dac5d2d0-98f5-94d9-8e69-46da2413593d%40enterprisedb.com

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/5faef9d582012433db9ad05af27a77bd591508e1

Modified Files
--------------
contrib/dblink/dblink.c                  |  6 ++----
contrib/postgres_fdw/postgres_fdw.c      | 24 ++++++++----------------
doc/src/sgml/libpq.sgml                  |  5 +++++
src/bin/pg_basebackup/streamutil.c       |  6 ++----
src/bin/pg_dump/pg_dumpall.c             |  3 +--
src/bin/psql/command.c                   |  3 +--
src/bin/psql/common.c                    |  3 +--
src/bin/psql/describe.c                  |  3 +--
src/fe_utils/query_utils.c               |  3 +--
src/interfaces/ecpg/ecpglib/descriptor.c |  3 +--
src/interfaces/ecpg/ecpglib/execute.c    |  3 +--
src/interfaces/libpq/fe-connect.c        |  6 ++----
src/interfaces/libpq/fe-exec.c           |  9 +++------
13 files changed, 29 insertions(+), 48 deletions(-)



view thread (3+ messages)

Message-ID: <E1o84FH-0012Ja-NT@gemulon.postgresql.org>
Permalink:  ../E1o84FH-0012Ja-NT@gemulon.postgresql.org/
Also on:    postgresql.org/message-id/E1o84FH-0012Ja-NT@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: peter@eisentraut.org
  Subject: Re: pgsql: Remove redundant null pointer checks before PQclear and PQconnin
  In-Reply-To: <E1o84FH-0012Ja-NT@gemulon.postgresql.org>
  References: <E1o84FH-0012Ja-NT@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