Re: [PATCH] RDMA: Replace zero-length array with flexible-array member

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Fri, Apr 01, 2022 at 07:54:06AM +0000, cgel.zte@xxxxxxxxx wrote:
> From: Lv Ruyi <lv.ruyi@xxxxxxxxxx>
> 
> There is a regular need in the kernel to provide a way to declare
> having a dynamically sized set of trailing elements in a structure.
> Kernel code should always use “flexible array members”[1] for these
> cases. The older style of one-element or zero-length arrays should
> no longer be used[2].

If I recall properly this doesn't work if the flex array is nested
inside another member.. Not sure what this thinks it is doing anyhow

Jason



[Index of Archives]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Photo]     [Yosemite News]     [Yosemite Photos]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux