diff options
author | Elyes Haouas <ehaouas@noos.fr> | 2023-07-28 06:10:19 +0200 |
---|---|---|
committer | Elyes Haouas <ehaouas@noos.fr> | 2023-07-30 09:59:46 +0000 |
commit | 7465c16e73f2cb9b01b9a0cd3e513dbe5f2470ef (patch) | |
tree | 1703e647819c4294fed6bd27b215d8ddf0cde129 /src/lib | |
parent | a8a0d394ddc66b82c109af4f2be8ddd53635cd1a (diff) |
lib/cbmem_console.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: I3d716b29d8e28584a0c9e4056d4c93dca2873114
Signed-off-by: Elyes Haouas <ehaouas@noos.fr>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/76780
Reviewed-by: Arthur Heymans <arthur@aheymans.xyz>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Diffstat (limited to 'src/lib')
-rw-r--r-- | src/lib/cbmem_console.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/lib/cbmem_console.c b/src/lib/cbmem_console.c index ad3b99bbba..fe33c3b6a4 100644 --- a/src/lib/cbmem_console.c +++ b/src/lib/cbmem_console.c @@ -28,7 +28,7 @@ struct cbmem_console { u32 size; u32 cursor; - u8 body[0]; + u8 body[]; } __packed; #define MAX_SIZE (1 << 28) /* can't be changed without breaking readers! */ |