From: Tom Lane <tgl@sss.pgh.pa.us>
To: pgsql-committers@lists.postgresql.org
Subject: pgsql: Fix double assignment.
Date: Sun, 14 Dec 2025 17:09:58 +0000
Message-ID: <E1vUpbZ-000kiR-2u@gemulon.postgresql.org> (raw)
Fix double assignment.
Coverity complained about this, not without reason:
OldMultiXactReader *state = state = pg_malloc(sizeof(*state));
(I'm surprised this is even legal C ... why is "state" in-scope
in its initialization expression?)
While at it, convert to use our newly-preferred "pg_malloc_object"
macro instead of an explicit sizeof().
Branch
------
master
Details
-------
https://git.postgresql.org/pg/commitdiff/b853e644d78d99ef1779c9bf7bc3944694460aa2
Modified Files
--------------
src/bin/pg_upgrade/multixact_read_v18.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
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 using the --to and --cc options:
reply via email
To: pgsql-committers@postgresql.org
Cc: tgl@sss.pgh.pa.us, pgsql-committers@lists.postgresql.org
Subject: Re: pgsql: Fix double assignment.
In-Reply-To: <E1vUpbZ-000kiR-2u@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