diff options
author | Tom Lane <tgl@sss.pgh.pa.us> | 2015-02-20 17:32:01 -0500 |
---|---|---|
committer | Tom Lane <tgl@sss.pgh.pa.us> | 2015-02-20 17:32:01 -0500 |
commit | 33a3b03d636b529b27f869e332b6344d52635331 (patch) | |
tree | c5227d0a7013626e9fa9c0973075de224bd4fa33 /src/backend/storage | |
parent | c110eff1324f5c882c737ad988191ed4a54c4936 (diff) |
Use FLEXIBLE_ARRAY_MEMBER in some more places.
Fix a batch of structs that are only visible within individual .c files.
Michael Paquier
Diffstat (limited to 'src/backend/storage')
-rw-r--r-- | src/backend/storage/ipc/pmsignal.c | 2 | ||||
-rw-r--r-- | src/backend/storage/ipc/procarray.c | 7 |
2 files changed, 3 insertions, 6 deletions
diff --git a/src/backend/storage/ipc/pmsignal.c b/src/backend/storage/ipc/pmsignal.c index 0c89eb7d9d0..ea3fe205491 100644 --- a/src/backend/storage/ipc/pmsignal.c +++ b/src/backend/storage/ipc/pmsignal.c @@ -66,7 +66,7 @@ struct PMSignalData /* per-child-process flags */ int num_child_flags; /* # of entries in PMChildFlags[] */ int next_child_flag; /* next slot to try to assign */ - sig_atomic_t PMChildFlags[1]; /* VARIABLE LENGTH ARRAY */ + sig_atomic_t PMChildFlags[FLEXIBLE_ARRAY_MEMBER]; }; NON_EXEC_STATIC volatile PMSignalData *PMSignalState = NULL; diff --git a/src/backend/storage/ipc/procarray.c b/src/backend/storage/ipc/procarray.c index a1ebc72d8d5..8eaec0ca6ed 100644 --- a/src/backend/storage/ipc/procarray.c +++ b/src/backend/storage/ipc/procarray.c @@ -90,11 +90,8 @@ typedef struct ProcArrayStruct /* oldest catalog xmin of any replication slot */ TransactionId replication_slot_catalog_xmin; - /* - * We declare pgprocnos[] as 1 entry because C wants a fixed-size array, - * but actually it is maxProcs entries long. - */ - int pgprocnos[1]; /* VARIABLE LENGTH ARRAY */ + /* indexes into allPgXact[], has PROCARRAY_MAXPROCS entries */ + int pgprocnos[FLEXIBLE_ARRAY_MEMBER]; } ProcArrayStruct; static ProcArrayStruct *procArray; |