From d1d8a2bd622a199e2f861cef100b6619d983fbec Mon Sep 17 00:00:00 2001 From: Jouni Malinen Date: Sun, 7 Feb 2016 21:01:41 +0200 Subject: [PATCH] EAP peer: Simplify buildNotify return There is no need for the local variable and two return statements. Signed-off-by: Jouni Malinen --- src/eap_peer/eap.c | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/src/eap_peer/eap.c b/src/eap_peer/eap.c index 463416917..9110ca5b9 100644 --- a/src/eap_peer/eap.c +++ b/src/eap_peer/eap.c @@ -1520,15 +1520,9 @@ static void eap_sm_processNotify(struct eap_sm *sm, const struct wpabuf *req) static struct wpabuf * eap_sm_buildNotify(int id) { - struct wpabuf *resp; - wpa_printf(MSG_DEBUG, "EAP: Generating EAP-Response Notification"); - resp = eap_msg_alloc(EAP_VENDOR_IETF, EAP_TYPE_NOTIFICATION, 0, - EAP_CODE_RESPONSE, id); - if (resp == NULL) - return NULL; - - return resp; + return eap_msg_alloc(EAP_VENDOR_IETF, EAP_TYPE_NOTIFICATION, 0, + EAP_CODE_RESPONSE, id); } -- 2.47.3