diff options
author | Elyes Haouas <ehaouas@noos.fr> | 2023-07-30 13:06:10 +0200 |
---|---|---|
committer | Jakub Czapiga <jacz@semihalf.com> | 2023-08-01 12:51:25 +0000 |
commit | fc2f304f062bc51cf51ad999caf13a6acc64a1b3 (patch) | |
tree | 4b4da22e0b78bdff9221b3814bc300b3f0fead40 /util/intelvbttool | |
parent | dc15867e3b938b6349fed3e809931657bdd24da6 (diff) |
util: 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: I6b87680ec9f501945ae266ae4e4927efd2399d56
Signed-off-by: Elyes Haouas <ehaouas@noos.fr>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/76815
Reviewed-by: Felix Singer <service+coreboot-gerrit@felixsinger.de>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Diffstat (limited to 'util/intelvbttool')
-rw-r--r-- | util/intelvbttool/intelvbttool.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/util/intelvbttool/intelvbttool.c b/util/intelvbttool/intelvbttool.c index c8d7a088d3..a70b33c76b 100644 --- a/util/intelvbttool/intelvbttool.c +++ b/util/intelvbttool/intelvbttool.c @@ -157,7 +157,7 @@ struct bdb_general_definitions { * number = (block_size - sizeof(bdb_general_definitions))/ * sizeof(child_device_config); */ - struct common_child_dev_config devices[0]; + struct common_child_dev_config devices[]; } __attribute__ ((packed)); struct bdb_driver_features { |