summaryrefslogtreecommitdiffstats
path: root/src/commonlib
diff options
context:
space:
mode:
authorElyes Haouas <ehaouas@noos.fr>2023-07-30 13:18:54 +0200
committerJakub Czapiga <jacz@semihalf.com>2023-08-01 12:56:19 +0000
commit3dc221fac3843dfbe9d67e6b4de6df243262fe42 (patch)
treeb95e36fe29c7823917612cf0a94c3956e9ff8e0c /src/commonlib
parent39aee649da164935f28f360fce91a4470a245195 (diff)
downloadcoreboot-3dc221fac3843dfbe9d67e6b4de6df243262fe42.tar.gz
coreboot-3dc221fac3843dfbe9d67e6b4de6df243262fe42.tar.bz2
coreboot-3dc221fac3843dfbe9d67e6b4de6df243262fe42.zip
commonlib/tpm_log_serialized.h: Use C99 flexible arrays
Use C99 flexible arrays instead of older style of one-element or zero-length arrays. It allows the compiler to generate errors when the flexible array does not occur at the end in the structure. Change-Id: I16ac584781214350355e0625f8a2eca39a37cf85 Signed-off-by: Elyes Haouas <ehaouas@noos.fr> Reviewed-on: https://review.coreboot.org/c/coreboot/+/76841 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Felix Singer <service+coreboot-gerrit@felixsinger.de>
Diffstat (limited to 'src/commonlib')
-rw-r--r--src/commonlib/include/commonlib/tpm_log_serialized.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/commonlib/include/commonlib/tpm_log_serialized.h b/src/commonlib/include/commonlib/tpm_log_serialized.h
index 8372f94dab68..26541cba1e80 100644
--- a/src/commonlib/include/commonlib/tpm_log_serialized.h
+++ b/src/commonlib/include/commonlib/tpm_log_serialized.h
@@ -21,7 +21,7 @@ struct tpm_cb_log_entry {
struct tpm_cb_log_table {
uint16_t max_entries;
uint16_t num_entries;
- struct tpm_cb_log_entry entries[0]; /* Variable number of entries */
+ struct tpm_cb_log_entry entries[]; /* Variable number of entries */
} __packed;
#endif