From e485286c67b2110862884e40bb93260e34b37721 Mon Sep 17 00:00:00 2001 From: Jouni Malinen Date: Sat, 11 Aug 2012 17:54:43 +0300 Subject: [PATCH] Remove unnecessary bssid_changed check The os_memcmp of bssid and wpa_s->bssid cannot return 0 in this code path since identical os_memcmp was already done above. Signed-hostap: Jouni Malinen --- wpa_supplicant/events.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/wpa_supplicant/events.c b/wpa_supplicant/events.c index 8f401504c..5b706705e 100644 --- a/wpa_supplicant/events.c +++ b/wpa_supplicant/events.c @@ -1506,7 +1506,6 @@ static void wpa_supplicant_event_assoc(struct wpa_supplicant *wpa_s, { u8 bssid[ETH_ALEN]; int ft_completed; - int bssid_changed; struct wpa_driver_capa capa; #ifdef CONFIG_AP @@ -1536,11 +1535,9 @@ static void wpa_supplicant_event_assoc(struct wpa_supplicant *wpa_s, wpa_dbg(wpa_s, MSG_DEBUG, "Associated to a new BSS: BSSID=" MACSTR, MAC2STR(bssid)); random_add_randomness(bssid, ETH_ALEN); - bssid_changed = os_memcmp(wpa_s->bssid, bssid, ETH_ALEN); os_memcpy(wpa_s->bssid, bssid, ETH_ALEN); os_memset(wpa_s->pending_bssid, 0, ETH_ALEN); - if (bssid_changed) - wpas_notify_bssid_changed(wpa_s); + wpas_notify_bssid_changed(wpa_s); if (wpa_supplicant_dynamic_keys(wpa_s) && !ft_completed) { wpa_clear_keys(wpa_s, bssid);