diff options
author | Peter Eisentraut <peter_e@gmx.net> | 2018-08-29 08:36:30 +0200 |
---|---|---|
committer | Peter Eisentraut <peter_e@gmx.net> | 2018-09-07 11:40:03 +0200 |
commit | 98afa68d935215e8ab2c7de7fb45972a03e3da26 (patch) | |
tree | ded48d64b8a9e943a5ea82de6675952d7050aa45 /src/backend/access/transam/xact.c | |
parent | 75f7855369ec56d4a8e7d6eae98aff1182b85cac (diff) | |
download | postgresql-98afa68d935215e8ab2c7de7fb45972a03e3da26.tar.gz postgresql-98afa68d935215e8ab2c7de7fb45972a03e3da26.zip |
Use C99 designated initializers for some structs
These are just a few particularly egregious cases that were hard to read
and write, and error prone because of many similar adjacent types.
Discussion: https://www.postgresql.org/message-id/flat/4c9f01be-9245-2148-b569-61a8562ef190%402ndquadrant.com
Diffstat (limited to 'src/backend/access/transam/xact.c')
-rw-r--r-- | src/backend/access/transam/xact.c | 23 |
1 files changed, 2 insertions, 21 deletions
diff --git a/src/backend/access/transam/xact.c b/src/backend/access/transam/xact.c index cd8270d5fb0..875be180fe4 100644 --- a/src/backend/access/transam/xact.c +++ b/src/backend/access/transam/xact.c @@ -199,27 +199,8 @@ typedef TransactionStateData *TransactionState; * transaction at all, or when in a top-level transaction. */ static TransactionStateData TopTransactionStateData = { - 0, /* transaction id */ - 0, /* subtransaction id */ - NULL, /* savepoint name */ - 0, /* savepoint level */ - TRANS_DEFAULT, /* transaction state */ - TBLOCK_DEFAULT, /* transaction block state from the client - * perspective */ - 0, /* transaction nesting depth */ - 0, /* GUC context nesting depth */ - NULL, /* cur transaction context */ - NULL, /* cur transaction resource owner */ - NULL, /* subcommitted child Xids */ - 0, /* # of subcommitted child Xids */ - 0, /* allocated size of childXids[] */ - InvalidOid, /* previous CurrentUserId setting */ - 0, /* previous SecurityRestrictionContext */ - false, /* entry-time xact r/o state */ - false, /* startedInRecovery */ - false, /* didLogXid */ - 0, /* parallelModeLevel */ - NULL /* link to parent state block */ + .state = TRANS_DEFAULT, + .blockState = TBLOCK_DEFAULT, }; /* |