]> git.ipfire.org Git - thirdparty/hostap.git/commitdiff
EAP-PEAP peer: Remove unused return value and error path
authorJouni Malinen <j@w1.fi>
Sat, 19 Dec 2015 17:54:56 +0000 (19:54 +0200)
committerJouni Malinen <j@w1.fi>
Sat, 19 Dec 2015 17:54:56 +0000 (19:54 +0200)
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>
src/eap_peer/eap_peap.c

index 0596098996e52abdd8798c5502557dc3fec21ac1..286c9390eaa0904de614833dafda8295a41675d0 100644 (file)
@@ -70,8 +70,8 @@ struct eap_peap_data {
 };
 
 
-static int eap_peap_parse_phase1(struct eap_peap_data *data,
-                                const char *phase1)
+static void eap_peap_parse_phase1(struct eap_peap_data *data,
+                                 const char *phase1)
 {
        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");
        }
 #endif /* EAP_TNC */
-
-       return 0;
 }
 
 
@@ -145,11 +143,8 @@ static void * eap_peap_init(struct eap_sm *sm)
        data->peap_outer_success = 2;
        data->crypto_binding = OPTIONAL_BINDING;
 
-       if (config && config->phase1 &&
-           eap_peap_parse_phase1(data, config->phase1) < 0) {
-               eap_peap_deinit(sm, data);
-               return NULL;
-       }
+       if (config && config->phase1)
+               eap_peap_parse_phase1(data, config->phase1);
 
        if (eap_peer_select_phase2_methods(config, "auth=",
                                           &data->phase2_types,