mirror of
https://github.com/postgres/postgres.git
synced 2025-09-06 13:46:51 +03:00
Use FLEXIBLE_ARRAY_MEMBER in some more places.
Fix a batch of structs that are only visible within individual .c files. Michael Paquier
This commit is contained in:
@@ -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;
|
||||
|
@@ -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;
|
||||
|
Reference in New Issue
Block a user