linux/net/bluetooth
Gustavo A. R. Silva 16e183423f Bluetooth: hci_event: Use struct_size() helper
Make use of the struct_size() helper instead of an open-coded version
in order to avoid any potential type mistakes, in particular in the
context in which this code is being used.

So, change the following form:

sizeof(*ev) + ev->num_hndl * sizeof(struct hci_comp_pkts_info)

 to :

struct_size(ev, handles, ev->num_hndl)

This code was detected with the help of Coccinelle.

Signed-off-by: Gustavo A. R. Silva <gustavo@embeddedor.com>
Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
2019-02-18 14:00:09 +01:00
..
2015-07-30 13:31:59 +02:00
2015-07-30 13:31:59 +02:00
2017-09-01 22:49:47 +02:00
2018-09-26 12:39:32 +03:00
2018-09-26 12:39:32 +03:00