]> git.ipfire.org Git - thirdparty/hostap.git/commitdiff
Remove unnecessary wpa_s->conf checks
authorJouni Malinen <j@w1.fi>
Sat, 26 Oct 2013 10:09:50 +0000 (13:09 +0300)
committerJouni Malinen <j@w1.fi>
Sat, 26 Oct 2013 12:55:52 +0000 (15:55 +0300)
wpa_s->conf cannot be NULL because wpa_supplicant_init_iface() would not
allow wpa_supplicant_add_iface() to return wpa_s instance in such state.

Signed-hostap: Jouni Malinen <j@w1.fi>

wpa_supplicant/wpa_supplicant.c

index 8ca88408b496853b8d45558f7512c69e7135444d..7fff3a631832785bb6081e1bba82206fb05c85a1 100644 (file)
@@ -217,7 +217,7 @@ static void wpa_supplicant_timeout(void *eloop_ctx, void *timeout_ctx)
 void wpa_supplicant_req_auth_timeout(struct wpa_supplicant *wpa_s,
                                     int sec, int usec)
 {
-       if (wpa_s->conf && wpa_s->conf->ap_scan == 0 &&
+       if (wpa_s->conf->ap_scan == 0 &&
            (wpa_s->drv_flags & WPA_DRIVER_FLAGS_WIRED))
                return;
 
@@ -293,11 +293,10 @@ void wpa_supplicant_initiate_eapol(struct wpa_supplicant *wpa_s)
                                EAPOL_REQUIRE_KEY_BROADCAST;
                }
 
-               if (wpa_s->conf && (wpa_s->drv_flags & WPA_DRIVER_FLAGS_WIRED))
+               if (wpa_s->drv_flags & WPA_DRIVER_FLAGS_WIRED)
                        eapol_conf.required_keys = 0;
        }
-       if (wpa_s->conf)
-               eapol_conf.fast_reauth = wpa_s->conf->fast_reauth;
+       eapol_conf.fast_reauth = wpa_s->conf->fast_reauth;
        eapol_conf.workaround = ssid->eap_workaround;
        eapol_conf.eap_disabled =
                !wpa_key_mgmt_wpa_ieee8021x(wpa_s->key_mgmt) &&