summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGustavo A. R. Silva <gustavoars@kernel.org>2022-02-16 14:32:40 -0600
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>2022-02-18 20:43:08 +0100
commit98835f452c698b015d4da999944405ecb90da670 (patch)
treea84a388956764b23b07f5bba3191408066d02c00
parent0914618b553d6f3366e568409cebf2656891ca69 (diff)
downloadacpica-98835f452c698b015d4da999944405ecb90da670.tar.gz
Headers: Replace zero-length array with flexible-array member
There is a regular need in the kernel to provide a way to declare having a dynamically sized set of trailing elements in a structure. Kernel code should always use “flexible array members”[1] for these cases. The older style of one-element or zero-length arrays should no longer be used[2]. [1] https://en.wikipedia.org/wiki/Flexible_array_member [2] https://www.kernel.org/doc/html/v5.16/process/deprecated.html#zero-length-and-one-element-arrays Link: https://github.com/KSPP/linux/issues/78 Signed-off-by: Gustavo A. R. Silva <gustavoars@kernel.org> Reviewed-by: Kees Cook <keescook@chromium.org> Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
-rw-r--r--source/include/actbl2.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/source/include/actbl2.h b/source/include/actbl2.h
index 2fa2bb4e2..e10dba090 100644
--- a/source/include/actbl2.h
+++ b/source/include/actbl2.h
@@ -2849,7 +2849,7 @@ typedef struct acpi_table_rgrt
UINT16 Version;
UINT8 ImageType;
UINT8 Reserved;
- UINT8 Image[0];
+ UINT8 Image[];
} ACPI_TABLE_RGRT;