Re: [PATCH] bpf: use flexible array members, not zero-length

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

 



On Sat, Sep 28, 2019 at 04:48:14PM +0200, Stephen Kitt wrote:
> This switches zero-length arrays in variable-length structs to C99
> flexible array members. GCC will then ensure that the arrays are
> always the last element in the struct.
> 
> Coccinelle:
> @@
> identifier S, fld;
> type T;
> @@
> 
> struct S {
>   ...
> - T fld[0];
> + T fld[];
>   ...
> };

You did not explain the "why is it needed" part, only what your
change is doing. What [compilation?] issue are you seeing that
you're trying to fix? This sort of information must be present
in a changelog.

> Signed-off-by: Stephen Kitt <steve@xxxxxxx>

Thanks,
Daniel



[Index of Archives]     [Kernel Newbies]     [Security]     [Netfilter]     [Bugtraq]     [Linux FS]     [Yosemite Forum]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Device Mapper]     [Linux Resources]

  Powered by Linux