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: Change some unnecessary MemSet calls
Date: Thu, 30 Jun 2022 22:34:18 +0000
Message-ID: <E1o72jo-000aIo-U5@gemulon.postgresql.org> (raw)

Change some unnecessary MemSet calls

MemSet() with a value other than 0 just falls back to memset(), so the
indirection is unnecessary if the value is constant and not 0.  Since
there is some interest in getting rid of MemSet(), this gets some easy
cases out of the way.  (There are a few MemSet() calls that I didn't
change to maintain the consistency with their surrounding code.)

Discussion: https://www.postgresql.org/message-id/flat/CAEudQApCeq4JjW1BdnwU=m=-DvG5WyUik0Yfn3p6UNphiHjj+w@mail....

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/258f48f858b0bcc4c3fac3fa01f79ee61ad0cd1e

Modified Files
--------------
contrib/hstore/hstore_gist.c          | 4 ++--
contrib/intarray/_intbig_gist.c       | 4 ++--
contrib/ltree/_ltree_gist.c           | 4 ++--
contrib/oid2name/oid2name.c           | 2 +-
contrib/pg_trgm/trgm_gist.c           | 4 ++--
src/backend/access/hash/hashovfl.c    | 2 +-
src/backend/replication/walreceiver.c | 2 +-
src/backend/utils/adt/tsgistidx.c     | 4 ++--
8 files changed, 13 insertions(+), 13 deletions(-)



Message-ID: <E1o72jo-000aIo-U5@gemulon.postgresql.org>
Permalink:  ../E1o72jo-000aIo-U5@gemulon.postgresql.org/
Also on:    postgresql.org/message-id/E1o72jo-000aIo-U5@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: Change some unnecessary MemSet calls
  In-Reply-To: <E1o72jo-000aIo-U5@gemulon.postgresql.org>
  References: <E1o72jo-000aIo-U5@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