Remove unnecessary wpa_s->conf checks

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>
This commit is contained in:
Jouni Malinen 2013-10-26 13:09:50 +03:00
parent 3318376101
commit a2a535f897

View 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, void wpa_supplicant_req_auth_timeout(struct wpa_supplicant *wpa_s,
int sec, int usec) 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)) (wpa_s->drv_flags & WPA_DRIVER_FLAGS_WIRED))
return; return;
@ -293,11 +293,10 @@ void wpa_supplicant_initiate_eapol(struct wpa_supplicant *wpa_s)
EAPOL_REQUIRE_KEY_BROADCAST; 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; 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.workaround = ssid->eap_workaround;
eapol_conf.eap_disabled = eapol_conf.eap_disabled =
!wpa_key_mgmt_wpa_ieee8021x(wpa_s->key_mgmt) && !wpa_key_mgmt_wpa_ieee8021x(wpa_s->key_mgmt) &&