diff options
author | Michael Paquier | 2024-02-27 23:42:36 +0000 |
---|---|---|
committer | Michael Paquier | 2024-02-27 23:42:36 +0000 |
commit | afd8ef39094b0dff9d1f2bfecb1d9fa056b85e19 (patch) | |
tree | ae38116a8d4667940cd9e8bc3fa8c9c08488ead0 /src/common/relpath.c | |
parent | e1724af42c7b0bddad2785f8f7a15c4c123862b2 (diff) |
Use C99-designated initializer syntax for more arrays
This is in the same spirit as ef5e2e90859a, updating this time some
arrays in parser.c, relpath.c, guc_tables.c and pg_dump_sort.c so as the
order of their elements has no need to match the enum structures they
are based on anymore.
Author: Jelte Fennema-Nio
Reviewed-by: Jian He, Japin Li
Discussion: https://postgr.es/m/CAGECzQT3caUbcCcszNewCCmMbCuyP7XNAm60J3ybd6PN5kH2Dw@mail.gmail.com
Diffstat (limited to 'src/common/relpath.c')
-rw-r--r-- | src/common/relpath.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/common/relpath.c b/src/common/relpath.c index b16fe19dea6..d9214f915c9 100644 --- a/src/common/relpath.c +++ b/src/common/relpath.c @@ -31,10 +31,10 @@ * pg_relation_size(). */ const char *const forkNames[] = { - "main", /* MAIN_FORKNUM */ - "fsm", /* FSM_FORKNUM */ - "vm", /* VISIBILITYMAP_FORKNUM */ - "init" /* INIT_FORKNUM */ + [MAIN_FORKNUM] = "main", + [FSM_FORKNUM] = "fsm", + [VISIBILITYMAP_FORKNUM] = "vm", + [INIT_FORKNUM] = "init", }; StaticAssertDecl(lengthof(forkNames) == (MAX_FORKNUM + 1), |