]> git.ipfire.org Git - thirdparty/hostap.git/commitdiff
Remove redundant NULL check in ieee802_1x_encapsulate_radius()
authorJouni Malinen <j@w1.fi>
Tue, 23 Jun 2015 15:18:25 +0000 (18:18 +0300)
committerJouni Malinen <j@w1.fi>
Tue, 23 Jun 2015 15:18:25 +0000 (18:18 +0300)
The eap argument to this function is never NULL and the earlier
ieee802_1x_learn_identity() call is dereferencing it anyway, so there is
no point in checking whether it is NULL later in the function.

Signed-off-by: Jouni Malinen <j@w1.fi>
src/ap/ieee802_1x.c

index 8aaadfeed3b0983fd882a80466a767ec003fe3d2..d45b98f1f288694d70a16e2694fe27609312d220 100644 (file)
@@ -600,7 +600,7 @@ static void ieee802_1x_encapsulate_radius(struct hostapd_data *hapd,
                goto fail;
        }
 
-       if (eap && !radius_msg_add_eap(msg, eap, len)) {
+       if (!radius_msg_add_eap(msg, eap, len)) {
                wpa_printf(MSG_INFO, "Could not add EAP-Message");
                goto fail;
        }