[PATCH][next] cifs: cifspdu.h: Replace one-element array with flexible-array member

Aurélien Aptel aaptel at suse.com
Fri Mar 26 15:54:49 UTC 2021


"Gustavo A. R. Silva" <gustavoars at kernel.org> writes:
> 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].

I've checked the usages of the struct, looks OK (we don't allocate it
directly, we use memory from the small/big buff pools).

Reviewed-by: Aurelien Aptel <aaptel at suse.com>

Cheers,
-- 
Aurélien Aptel / SUSE Labs Samba Team
GPG: 1839 CB5F 9F5B FB9B AA97  8C99 03C8 A49B 521B D5D3
SUSE Software Solutions Germany GmbH, Maxfeldstr. 5, 90409 Nürnberg, DE
GF: Felix Imendörffer, Mary Higgins, Sri Rasiah HRB 247165 (AG München)




More information about the samba-technical mailing list