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

2020-05-11 Thread Daniel Borkmann
On 5/9/20 9:16 PM, Yonghong Song wrote: On 5/7/20 11:50 AM, Gustavo A. R. Silva wrote: The current codebase makes use of the zero-length array language extension to the C90 standard, but the preferred mechanism to declare variable-length types such as these ones is a flexible array

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

2020-05-09 Thread Yonghong Song
On 5/7/20 11:50 AM, Gustavo A. R. Silva wrote: The current codebase makes use of the zero-length array language extension to the C90 standard, but the preferred mechanism to declare variable-length types such as these ones is a flexible array member[1][2], introduced in C99: struct foo {

[PATCH] libbpf: Replace zero-length array with flexible-array

2020-05-07 Thread Gustavo A. R. Silva
The current codebase makes use of the zero-length array language extension to the C90 standard, but the preferred mechanism to declare variable-length types such as these ones is a flexible array member[1][2], introduced in C99: struct foo { int stuff; struct boo array[]; }; By