projects
/
users
/
bernd
/
postgres.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
dbb9841
)
Use [FLEXIBLE_ARRAY_MEMBER] not [1] in MultiSortSupportData.
author
Tom Lane
<tgl@sss.pgh.pa.us>
Mon, 15 Apr 2019 23:32:36 +0000
(19:32 -0400)
committer
Tom Lane
<tgl@sss.pgh.pa.us>
Mon, 15 Apr 2019 23:32:44 +0000
(19:32 -0400)
This struct seems to have not gotten the word about preferred
coding style for variable-length arrays.
src/include/statistics/extended_stats_internal.h
patch
|
blob
|
blame
|
history
diff --git
a/src/include/statistics/extended_stats_internal.h
b/src/include/statistics/extended_stats_internal.h
index 9fc591261eb27f9599d10c98a48209c2d9f1dd1e..cc36176b3c5279f317ba3fcd3db17faece32da4a 100644
(file)
--- a/
src/include/statistics/extended_stats_internal.h
+++ b/
src/include/statistics/extended_stats_internal.h
@@
-43,8
+43,9
@@
typedef struct DimensionInfo
/* multi-sort */
typedef struct MultiSortSupportData
{
- int ndims; /* number of dimensions supported by the */
- SortSupportData ssup[1]; /* sort support data for each dimension */
+ int ndims; /* number of dimensions */
+ /* sort support data for each dimension: */
+ SortSupportData ssup[FLEXIBLE_ARRAY_MEMBER];
} MultiSortSupportData;
typedef MultiSortSupportData *MultiSortSupport;