1
0
mirror of https://github.com/postgres/postgres.git synced 2025-07-08 11:42:09 +03:00

Use FLEXIBLE_ARRAY_MEMBER in a number of other places.

I think we're about done with this...
This commit is contained in:
Tom Lane
2015-02-21 16:12:14 -05:00
parent e1a11d9311
commit 2e211211a7
14 changed files with 54 additions and 62 deletions

View File

@ -103,10 +103,11 @@ typedef struct ss_scan_locations_t
{
ss_lru_item_t *head;
ss_lru_item_t *tail;
ss_lru_item_t items[1]; /* SYNC_SCAN_NELEM items */
ss_lru_item_t items[FLEXIBLE_ARRAY_MEMBER]; /* SYNC_SCAN_NELEM items */
} ss_scan_locations_t;
#define SizeOfScanLocations(N) offsetof(ss_scan_locations_t, items[N])
#define SizeOfScanLocations(N) \
(offsetof(ss_scan_locations_t, items) + (N) * sizeof(ss_lru_item_t))
/* Pointer to struct in shared memory */
static ss_scan_locations_t *scan_locations;