commonlib/fsp_relocate.c: 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: I52b5a83e7e484889bfef5a4e45a0279fadd58890
Signed-off-by: Elyes Haouas <ehaouas@noos.fr>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/76784
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Arthur Heymans <arthur@aheymans.xyz>
This commit is contained in:
Elyes Haouas 2023-07-28 06:16:27 +02:00
parent 8c0168ab86
commit c1700e02fa
1 changed files with 1 additions and 1 deletions

View File

@ -55,7 +55,7 @@ struct fsp_patch_table {
uint8_t header_revision;
uint8_t reserved;
uint32_t patch_entry_num;
uint32_t patch_entries[0];
uint32_t patch_entries[];
} __packed;
#define FSPP_SIG 0x50505346