mirror of
https://github.com/postgres/postgres.git
synced 2025-07-02 09:02:37 +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:
@ -1836,7 +1836,7 @@ typedef struct BTVacInfo
|
||||
BTCycleId cycle_ctr; /* cycle ID most recently assigned */
|
||||
int num_vacuums; /* number of currently active VACUUMs */
|
||||
int max_vacuums; /* allocated length of vacuums[] array */
|
||||
BTOneVacInfo vacuums[1]; /* VARIABLE LENGTH ARRAY */
|
||||
BTOneVacInfo vacuums[FLEXIBLE_ARRAY_MEMBER];
|
||||
} BTVacInfo;
|
||||
|
||||
static BTVacInfo *btvacinfo;
|
||||
@ -1984,7 +1984,7 @@ BTreeShmemSize(void)
|
||||
{
|
||||
Size size;
|
||||
|
||||
size = offsetof(BTVacInfo, vacuums[0]);
|
||||
size = offsetof(BTVacInfo, vacuums);
|
||||
size = add_size(size, mul_size(MaxBackends, sizeof(BTOneVacInfo)));
|
||||
return size;
|
||||
}
|
||||
|
Reference in New Issue
Block a user