diff options
| author | 2019-02-25 13:11:37 -0600 | |
|---|---|---|
| committer | 2019-02-26 09:46:49 +0100 | |
| commit | 4a67e5d4adbf3b419f17924322f468ac5cb8c14f (patch) | |
| tree | 67b51137a85bfc9ee5efd93d282e72b53f1d9013 /include/linux | |
| parent | net: wan: z85230: replace dev_kfree_skb_irq by dev_consume_skb_irq for drop profiles (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 'include/linux')
0 files changed, 0 insertions, 0 deletions
