summaryrefslogtreecommitdiffstats
path: root/drivers/bluetooth/hci_ldisc.c
diff options
context:
space:
mode:
authorGustavo A. R. Silva <gustavo@embeddedor.com>2019-02-25 20:11:37 +0100
committerMarcel Holtmann <marcel@holtmann.org>2019-02-26 09:46:49 +0100
commit4a67e5d4adbf3b419f17924322f468ac5cb8c14f (patch)
tree67b51137a85bfc9ee5efd93d282e72b53f1d9013 /drivers/bluetooth/hci_ldisc.c
parentnet: wan: z85230: replace dev_kfree_skb_irq by dev_consume_skb_irq for drop p... (diff)
downloadlinux-4a67e5d4adbf3b419f17924322f468ac5cb8c14f.tar.xz
linux-4a67e5d4adbf3b419f17924322f468ac5cb8c14f.zip
Bluetooth: mgmt: 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(*rp) + (sizeof(rp->entry[0]) * count); to : struct_size(rp, entry, count) Notice that, in this case, variable rp_len is not necessary, hence it is removed. 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>
Diffstat (limited to 'drivers/bluetooth/hci_ldisc.c')
0 files changed, 0 insertions, 0 deletions