29 Nov
2017
29 Nov
'17
12:33 p.m.
Jorge Sanjuan wrote:
Make bmaControls be a pointer insted of a fixed size array so it can have a variable length.
/* bmaControls is actually u32, * but u8 is needed for the hybrid parser */
- __u8 bmaControls[0]; /* variable length */
- __u8 bmaControls[]; /* variable length */ /* wFeatureDescrStr omitted */
} __attribute__((packed));
This is not a pointer but a flexible array member. And in theory, it does not change anything: https://gcc.gnu.org/onlinedocs/gcc/Zero-Length.html
Regards, Clemens