From c99df20192d8c3f164bdb8531d04cbfe3b482b21 Mon Sep 17 00:00:00 2001 From: Jouni Malinen Date: Tue, 23 Jun 2015 18:18:25 +0300 Subject: [PATCH] Remove redundant NULL check in ieee802_1x_encapsulate_radius() 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 --- src/ap/ieee802_1x.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/ap/ieee802_1x.c b/src/ap/ieee802_1x.c index 8aaadfeed..d45b98f1f 100644 --- a/src/ap/ieee802_1x.c +++ b/src/ap/ieee802_1x.c @@ -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; }