Skip to content

Commit

Permalink
wifi: cfg80211: make cfg80211_auth_request::key_idx signed
Browse files Browse the repository at this point in the history
We might assign -1 to it in some cases when key is NULL,
which means the key_idx isn't used but can lead to a
warning from static checkers such as smatch.

Make the struct member signed simply to avoid that, we
only need a range of -1..3 anyway.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
  • Loading branch information
Johannes Berg committed Jul 15, 2022
1 parent c0d6701 commit 23cc6d8
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion include/net/cfg80211.h
Original file line number Diff line number Diff line change
Expand Up @@ -2773,7 +2773,8 @@ struct cfg80211_auth_request {
size_t ie_len;
enum nl80211_auth_type auth_type;
const u8 *key;
u8 key_len, key_idx;
u8 key_len;
s8 key_idx;
const u8 *auth_data;
size_t auth_data_len;
s8 link_id;
Expand Down

0 comments on commit 23cc6d8

Please sign in to comment.