mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-30 03:27:44 -04:00
cfg80211: Use const more consistently in for_each_element macros
Enforce the first argument to be a correct type of a pointer to struct element and avoid unnecessary typecasts from const to non-const pointers (the change in validate_ie_attr() is needed to make this part work). In addition, avoid signed/unsigned comparison within for_each_element() and mark struct element packed just in case. Signed-off-by: Jouni Malinen <[email protected]> Signed-off-by: Johannes Berg <[email protected]>
This commit is contained in:
parent
e646a0257b
commit
7388afe091
2 changed files with 10 additions and 10 deletions
|
|
@ -205,7 +205,7 @@ static int validate_ie_attr(const struct nlattr *attr,
|
|||
{
|
||||
const u8 *data = nla_data(attr);
|
||||
unsigned int len = nla_len(attr);
|
||||
struct element *elem;
|
||||
const struct element *elem;
|
||||
|
||||
for_each_element(elem, data, len) {
|
||||
/* nothing */
|
||||
|
|
|
|||
Loading…
Reference in a new issue