diff options
author | Jouni Malinen <j@w1.fi> | 2019-02-11 09:29:04 -0500 |
---|---|---|
committer | Johannes Berg <johannes.berg@intel.com> | 2019-02-11 10:51:18 -0500 |
commit | 7388afe09143210f555bdd6c75035e9acc1fab96 (patch) | |
tree | 346e6b05bc94025dfad7c2ba4ad8c1023a5035f8 /net/wireless | |
parent | e646a0257b64dbef9d168e0f90daafa3fc1a83af (diff) |
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 <j@w1.fi>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Diffstat (limited to 'net/wireless')
-rw-r--r-- | net/wireless/nl80211.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/net/wireless/nl80211.c b/net/wireless/nl80211.c index 5d85f6032f84..80878b431584 100644 --- a/net/wireless/nl80211.c +++ b/net/wireless/nl80211.c | |||
@@ -205,7 +205,7 @@ static int validate_ie_attr(const struct nlattr *attr, | |||
205 | { | 205 | { |
206 | const u8 *data = nla_data(attr); | 206 | const u8 *data = nla_data(attr); |
207 | unsigned int len = nla_len(attr); | 207 | unsigned int len = nla_len(attr); |
208 | struct element *elem; | 208 | const struct element *elem; |
209 | 209 | ||
210 | for_each_element(elem, data, len) { | 210 | for_each_element(elem, data, len) { |
211 | /* nothing */ | 211 | /* nothing */ |