nl80211: Fix undefined behavior in bit shift

Shifting signed 32-bit value by 31 bits is undefined.  Changing most
significant bit to unsigned.

Signed-off-by: Jiunn Chang <c0d1n61at3@gmail.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
This commit is contained in:
Jiunn Chang 2019-06-27 00:04:26 -05:00 committed by Johannes Berg
parent 556e2f6020
commit d2ce8d6bfc
1 changed files with 1 additions and 1 deletions

View File

@ -5314,7 +5314,7 @@ enum nl80211_feature_flags {
NL80211_FEATURE_TDLS_CHANNEL_SWITCH = 1 << 28,
NL80211_FEATURE_SCAN_RANDOM_MAC_ADDR = 1 << 29,
NL80211_FEATURE_SCHED_SCAN_RANDOM_MAC_ADDR = 1 << 30,
NL80211_FEATURE_ND_RANDOM_MAC_ADDR = 1 << 31,
NL80211_FEATURE_ND_RANDOM_MAC_ADDR = 1U << 31,
};
/**