EAP-PEAP peer: Remove unused return value and error path

eap_peap_parse_phase1() returned 0 unconditionally, so there was no need
for that return value or the code path that tried to address the error
case.

Signed-off-by: Jouni Malinen <j@w1.fi>
This commit is contained in:
Jouni Malinen 2015-12-19 19:54:56 +02:00
parent 61f25f80b4
commit 6560caf2ca

View file

@ -70,8 +70,8 @@ struct eap_peap_data {
}; };
static int eap_peap_parse_phase1(struct eap_peap_data *data, static void eap_peap_parse_phase1(struct eap_peap_data *data,
const char *phase1) const char *phase1)
{ {
const char *pos; const char *pos;
@ -126,8 +126,6 @@ static int eap_peap_parse_phase1(struct eap_peap_data *data,
wpa_printf(MSG_DEBUG, "EAP-PEAP: SoH version 2 enabled"); wpa_printf(MSG_DEBUG, "EAP-PEAP: SoH version 2 enabled");
} }
#endif /* EAP_TNC */ #endif /* EAP_TNC */
return 0;
} }
@ -145,11 +143,8 @@ static void * eap_peap_init(struct eap_sm *sm)
data->peap_outer_success = 2; data->peap_outer_success = 2;
data->crypto_binding = OPTIONAL_BINDING; data->crypto_binding = OPTIONAL_BINDING;
if (config && config->phase1 && if (config && config->phase1)
eap_peap_parse_phase1(data, config->phase1) < 0) { eap_peap_parse_phase1(data, config->phase1);
eap_peap_deinit(sm, data);
return NULL;
}
if (eap_peer_select_phase2_methods(config, "auth=", if (eap_peer_select_phase2_methods(config, "auth=",
&data->phase2_types, &data->phase2_types,