[PATCH 1/7] member: replace zero length array with flex array
Tyler Retzlaff
roretzla at linux.microsoft.com
Sat Jan 14 01:19:21 CET 2023
On Fri, Jan 13, 2023 at 01:51:59PM -0800, Stephen Hemminger wrote:
> Zero length arrays are GNU extension. Replace with
> standard flex array.
>
> Signed-off-by: Stephen Hemminger <stephen at networkplumber.org>
> ---
> lib/member/rte_member_heap.h | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/lib/member/rte_member_heap.h b/lib/member/rte_member_heap.h
> index 9c4a01aebe95..ab6319bc2de4 100644
> --- a/lib/member/rte_member_heap.h
> +++ b/lib/member/rte_member_heap.h
> @@ -26,7 +26,7 @@ struct hash {
> uint16_t bkt_cnt;
> uint16_t num_item;
> uint32_t seed;
> - struct hash_bkt buckets[0];
> + struct hash_bkt buckets[];
> };
>
> struct node {
> --
i suppose arguably this series depends on the series Bruce is putting
up defaulting the minimum C standard to C99 since technically that's the
minimum needed for the flexible array members.
Series-acked-by: Tyler Retzlaff <roretzla at linux.microsoft.com>
More information about the dev
mailing list