Remove unnecessary bss != NULL checks from sme_authenticate()

This is already verified in the beginning of the function, so no need
to repeat that multiple times.
This commit is contained in:
Jouni Malinen 2010-01-10 21:31:54 +02:00
parent b2180f4a89
commit f337f0e950

View file

@ -100,8 +100,8 @@ void sme_authenticate(struct wpa_supplicant *wpa_s,
if (bssid_changed) if (bssid_changed)
wpas_notify_bssid_changed(wpa_s); wpas_notify_bssid_changed(wpa_s);
if (bss && (wpa_bss_get_vendor_ie(bss, WPA_IE_VENDOR_TYPE) || if ((wpa_bss_get_vendor_ie(bss, WPA_IE_VENDOR_TYPE) ||
wpa_bss_get_ie(bss, WLAN_EID_RSN)) && wpa_bss_get_ie(bss, WLAN_EID_RSN)) &&
(ssid->key_mgmt & (WPA_KEY_MGMT_IEEE8021X | WPA_KEY_MGMT_PSK | (ssid->key_mgmt & (WPA_KEY_MGMT_IEEE8021X | WPA_KEY_MGMT_PSK |
WPA_KEY_MGMT_FT_IEEE8021X | WPA_KEY_MGMT_FT_IEEE8021X |
WPA_KEY_MGMT_FT_PSK | WPA_KEY_MGMT_FT_PSK |
@ -194,7 +194,7 @@ void sme_authenticate(struct wpa_supplicant *wpa_s,
#ifdef CONFIG_IEEE80211W #ifdef CONFIG_IEEE80211W
wpa_s->sme.mfp = ssid->ieee80211w; wpa_s->sme.mfp = ssid->ieee80211w;
if (ssid->ieee80211w != NO_MGMT_FRAME_PROTECTION && bss) { if (ssid->ieee80211w != NO_MGMT_FRAME_PROTECTION) {
const u8 *rsn = wpa_bss_get_ie(bss, WLAN_EID_RSN); const u8 *rsn = wpa_bss_get_ie(bss, WLAN_EID_RSN);
struct wpa_ie_data _ie; struct wpa_ie_data _ie;
if (rsn && wpa_parse_wpa_ie(rsn, 2 + rsn[1], &_ie) == 0 && if (rsn && wpa_parse_wpa_ie(rsn, 2 + rsn[1], &_ie) == 0 &&