aboutsummaryrefslogtreecommitdiff
path: root/src/backend/access
diff options
context:
space:
mode:
authorTom Lane <tgl@sss.pgh.pa.us>2015-02-21 16:12:14 -0500
committerTom Lane <tgl@sss.pgh.pa.us>2015-02-21 16:12:14 -0500
commit2e211211a76782b6084194a5ced94c0795460047 (patch)
treef98c4ff74b421ecb675e5192c0c1759546d22a86 /src/backend/access
parente1a11d93111ff3fba7a91f3f2ac0b0aca16909a8 (diff)
downloadpostgresql-2e211211a76782b6084194a5ced94c0795460047.tar.gz
postgresql-2e211211a76782b6084194a5ced94c0795460047.zip
Use FLEXIBLE_ARRAY_MEMBER in a number of other places.
I think we're about done with this...
Diffstat (limited to 'src/backend/access')
-rw-r--r--src/backend/access/heap/syncscan.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/backend/access/heap/syncscan.c b/src/backend/access/heap/syncscan.c
index ae7589abefd..266c3309c0b 100644
--- a/src/backend/access/heap/syncscan.c
+++ b/src/backend/access/heap/syncscan.c
@@ -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;