summaryrefslogtreecommitdiff
path: root/drivers/bluetooth
diff options
context:
space:
mode:
authorGustavo A. R. Silva <gustavo@embeddedor.com>2019-02-25 13:11:37 -0600
committerMarcel Holtmann <marcel@holtmann.org>2019-02-26 09:46:49 +0100
commit4a67e5d4adbf3b419f17924322f468ac5cb8c14f (patch)
tree67b51137a85bfc9ee5efd93d282e72b53f1d9013 /drivers/bluetooth
parentc14f7e1efcbf744c49fcb44a121112c54d2c5330 (diff)
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')
0 files changed, 0 insertions, 0 deletions