pgsql: Change some unnecessary MemSet calls

From: Peter Eisentraut <peter(at)eisentraut(dot)org>
To: pgsql-committers(at)lists(dot)postgresql(dot)org
Subject: pgsql: Change some unnecessary MemSet calls
Date: 2022-06-30 22:34:18
Message-ID: E1o72jo-000aIo-U5@gemulon.postgresql.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-committers

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(at)mail(dot)gmail(dot)com

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(-)

Browse pgsql-committers by date

  From Date Subject
Next Message Michael Paquier 2022-07-01 00:14:57 pgsql: Refactor the TAP test of auto_explain
Previous Message Peter Eisentraut 2022-06-30 18:14:11 pgsql: Avoid unnecessary MemSet call