From f337f0e9509e645a8732eb1992c8a11c9cff048c Mon Sep 17 00:00:00 2001 From: Jouni Malinen Date: Sun, 10 Jan 2010 21:31:54 +0200 Subject: [PATCH] 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. --- wpa_supplicant/sme.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/wpa_supplicant/sme.c b/wpa_supplicant/sme.c index 24f94a56e..dadd83789 100644 --- a/wpa_supplicant/sme.c +++ b/wpa_supplicant/sme.c @@ -100,8 +100,8 @@ void sme_authenticate(struct wpa_supplicant *wpa_s, if (bssid_changed) wpas_notify_bssid_changed(wpa_s); - if (bss && (wpa_bss_get_vendor_ie(bss, WPA_IE_VENDOR_TYPE) || - wpa_bss_get_ie(bss, WLAN_EID_RSN)) && + if ((wpa_bss_get_vendor_ie(bss, WPA_IE_VENDOR_TYPE) || + wpa_bss_get_ie(bss, WLAN_EID_RSN)) && (ssid->key_mgmt & (WPA_KEY_MGMT_IEEE8021X | WPA_KEY_MGMT_PSK | WPA_KEY_MGMT_FT_IEEE8021X | WPA_KEY_MGMT_FT_PSK | @@ -194,7 +194,7 @@ void sme_authenticate(struct wpa_supplicant *wpa_s, #ifdef CONFIG_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); struct wpa_ie_data _ie; if (rsn && wpa_parse_wpa_ie(rsn, 2 + rsn[1], &_ie) == 0 &&