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: Replace many MemSet calls with struct initialization
Date: Sat, 16 Jul 2022 06:53:16 +0000
Message-ID: <E1oCbfv-000RU7-TB@gemulon.postgresql.org> (raw )
Replace many MemSet calls with struct initialization
This replaces all MemSet() calls with struct initialization where that
is easily and obviously possible. (For example, some cases have to
worry about padding bits, so I left those.)
(The same could be done with appropriate memset() calls, but this
patch is part of an effort to phase out MemSet(), so it doesn't touch
memset() calls.)
Reviewed-by: Ranier Vilela <ranier.vf@gmail.com>
Reviewed-by: Alvaro Herrera <alvherre@alvh.no-ip.org>
Discussion: https://www.postgresql.org/message-id/9847b13c-b785-f4e2-75c3-12ec77a3b05c@enterprisedb.com
Branch
------
master
Details
-------
https://git.postgresql.org/pg/commitdiff/9fd45870c1436b477264c0c82eb195df52bc0919
Modified Files
--------------
contrib/amcheck/verify_heapam.c | 6 +-
contrib/bloom/blcost.c | 4 +-
contrib/pageinspect/brinfuncs.c | 7 +-
contrib/pageinspect/hashfuncs.c | 16 +--
contrib/pageinspect/heapfuncs.c | 8 +-
contrib/pg_prewarm/autoprewarm.c | 6 +-
contrib/pg_stat_statements/pg_stat_statements.c | 7 +-
contrib/pg_visibility/pg_visibility.c | 15 +--
contrib/pg_walinspect/pg_walinspect.c | 25 ++--
contrib/pgstattuple/pgstatindex.c | 3 +-
contrib/postgres_fdw/connection.c | 7 +-
contrib/postgres_fdw/postgres_fdw.c | 3 +-
src/backend/access/transam/twophase.c | 6 +-
src/backend/access/transam/xlogfuncs.c | 7 +-
src/backend/catalog/aclchk.c | 146 +++++++-----------------
src/backend/catalog/dependency.c | 3 +-
src/backend/catalog/heap.c | 24 ++--
src/backend/catalog/index.c | 4 +-
src/backend/catalog/pg_attrdef.c | 9 +-
src/backend/catalog/pg_cast.c | 4 +-
src/backend/catalog/pg_parameter_acl.c | 6 +-
src/backend/catalog/pg_publication.c | 6 +-
src/backend/commands/dbcommands.c | 35 ++----
src/backend/commands/event_trigger.c | 11 +-
src/backend/commands/functioncmds.c | 7 +-
src/backend/commands/prepare.c | 4 +-
src/backend/commands/tablecmds.c | 44 +++----
src/backend/commands/tablespace.c | 4 +-
src/backend/commands/typecmds.c | 9 +-
src/backend/commands/user.c | 37 ++----
src/backend/optimizer/path/costsize.c | 3 +-
src/backend/parser/parse_target.c | 3 +-
src/backend/replication/logical/launcher.c | 7 +-
src/backend/replication/walsender.c | 17 +--
src/backend/rewrite/rewriteDefine.c | 8 +-
src/backend/utils/adt/acl.c | 4 +-
src/backend/utils/adt/arrayfuncs.c | 3 +-
src/backend/utils/adt/datetime.c | 8 +-
src/backend/utils/adt/lockfuncs.c | 12 +-
src/backend/utils/adt/partitionfuncs.c | 6 +-
src/backend/utils/adt/pgstatfuncs.c | 52 +++------
src/backend/utils/adt/selfuncs.c | 19 +--
src/backend/utils/adt/timestamp.c | 8 +-
src/backend/utils/mmgr/portalmem.c | 4 +-
src/bin/pg_basebackup/pg_basebackup.c | 13 +--
src/bin/pg_basebackup/pg_receivewal.c | 4 +-
src/bin/pg_basebackup/walmethods.c | 6 +-
src/common/ip.c | 4 +-
src/port/snprintf.c | 8 +-
src/test/modules/test_predtest/test_predtest.c | 3 +-
src/test/regress/regress.c | 3 +-
51 files changed, 200 insertions(+), 468 deletions(-)
view thread (2+ messages) latest in thread
Message-ID: <E1oCbfv-000RU7-TB@gemulon.postgresql.org>
Permalink: ../E1oCbfv-000RU7-TB@gemulon.postgresql.org/
Also on: postgresql.org/message-id/E1oCbfv-000RU7-TB@gemulon.postgresql.org
copy link · copy postgr.es
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: Replace many MemSet calls with struct initialization
In-Reply-To: <E1oCbfv-000RU7-TB@gemulon.postgresql.org>
References: <E1oCbfv-000RU7-TB@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