1
0
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:
Tom Lane
2015-02-20 17:32:01 -05:00
parent c110eff132
commit 33a3b03d63
11 changed files with 32 additions and 37 deletions

View File

@ -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;
}