EAP peer: Simplify buildNotify return
There is no need for the local variable and two return statements. Signed-off-by: Jouni Malinen <j@w1.fi>
This commit is contained in:
parent
7dbd2c6c69
commit
d1d8a2bd62
1 changed files with 2 additions and 8 deletions
|
@ -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)
|
static struct wpabuf * eap_sm_buildNotify(int id)
|
||||||
{
|
{
|
||||||
struct wpabuf *resp;
|
|
||||||
|
|
||||||
wpa_printf(MSG_DEBUG, "EAP: Generating EAP-Response Notification");
|
wpa_printf(MSG_DEBUG, "EAP: Generating EAP-Response Notification");
|
||||||
resp = eap_msg_alloc(EAP_VENDOR_IETF, EAP_TYPE_NOTIFICATION, 0,
|
return eap_msg_alloc(EAP_VENDOR_IETF, EAP_TYPE_NOTIFICATION, 0,
|
||||||
EAP_CODE_RESPONSE, id);
|
EAP_CODE_RESPONSE, id);
|
||||||
if (resp == NULL)
|
|
||||||
return NULL;
|
|
||||||
|
|
||||||
return resp;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue