summaryrefslogtreecommitdiff
path: root/src/vendorcode/cavium/bdk
diff options
context:
space:
mode:
authorElyes Haouas <ehaouas@noos.fr>2023-07-30 12:55:53 +0200
committerMatt DeVillier <matt.devillier@amd.corp-partner.google.com>2023-08-08 16:01:08 +0000
commiteb23fbeab0b02e6998467411e7d4faf62fda0f8a (patch)
tree5b8eaf181b215895312e5a0fb3680e390279dbfe /src/vendorcode/cavium/bdk
parentdadb2483335296868f61b2aff62b8e6e06d61106 (diff)
vendorcode/cavium: 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: I19c029968584fedbb6749e66c7ea2f74a7d580f4 Signed-off-by: Elyes Haouas <ehaouas@noos.fr> Reviewed-on: https://review.coreboot.org/c/coreboot/+/76811 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Martin L Roth <gaumless@gmail.com>
Diffstat (limited to 'src/vendorcode/cavium/bdk')
-rw-r--r--src/vendorcode/cavium/bdk/libbdk-hal/bdk-nic.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/vendorcode/cavium/bdk/libbdk-hal/bdk-nic.c b/src/vendorcode/cavium/bdk/libbdk-hal/bdk-nic.c
index b6a9384e10..1a996365be 100644
--- a/src/vendorcode/cavium/bdk/libbdk-hal/bdk-nic.c
+++ b/src/vendorcode/cavium/bdk/libbdk-hal/bdk-nic.c
@@ -80,7 +80,7 @@ typedef struct
int next_free_cpi;
int next_free_rssi;
int next_free_bpid;
- nic_t *nic_map[0]; /* Indexed by handle->nic_id */
+ nic_t *nic_map[]; /* Indexed by handle->nic_id */
} nic_node_state_t;
static nic_node_state_t *global_node_state[BDK_NUMA_MAX_NODES];