Thread (7 messages) 7 messages, 4 authors, 2019-09-30

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

From: Daniel Borkmann <daniel@iogearbox.net>
Date: 2019-09-30 08:50:08
Also in: bpf, linux-doc

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 <redacted>
Thanks,
Daniel
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help