mirror of
https://github.com/postgres/postgres.git
synced 2026-04-21 14:19:26 -04:00
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().
This commit is contained in:
parent
8c498479d7
commit
b853e644d7
1 changed files with 1 additions and 1 deletions
|
|
@ -119,7 +119,7 @@ OldMultiXactReader *
|
|||
AllocOldMultiXactRead(char *pgdata, MultiXactId nextMulti,
|
||||
MultiXactOffset32 nextOffset)
|
||||
{
|
||||
OldMultiXactReader *state = state = pg_malloc(sizeof(*state));
|
||||
OldMultiXactReader *state = pg_malloc_object(OldMultiXactReader);
|
||||
char dir[MAXPGPATH] = {0};
|
||||
|
||||
state->nextMXact = nextMulti;
|
||||
|
|
|
|||
Loading…
Reference in a new issue