OSDN Git Service

Bluetooth: mgmt: Replace zero-length array with flexible-array member
authorChangcheng Deng <deng.changcheng@zte.com.cn>
Fri, 21 Jan 2022 01:35:08 +0000 (01:35 +0000)
committerMarcel Holtmann <marcel@holtmann.org>
Fri, 4 Mar 2022 15:10:49 +0000 (16:10 +0100)
commit3a0318140a6f8c3ab60f1f46c3f203923cb01882
treebeb5cbf5a16cbc31d6d7925a947c298f2264c06a
parent1039135aedfc5021b4827eb87276d7b4272024ac
Bluetooth: mgmt: Replace zero-length array with flexible-array member

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" for these cases. The older
style of one-element or zero-length arrays should no longer be used.
Reference:
https://www.kernel.org/doc/html/latest/process/deprecated.html#zero-length-and-one-element-arrays

Reported-by: Zeal Robot <zealci@zte.com.cn>
Signed-off-by: Changcheng Deng <deng.changcheng@zte.com.cn>
Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
include/net/bluetooth/mgmt.h