From 09448d94a7c93edfd34ceec4dac16e390ef6bb6c Mon Sep 17 00:00:00 2001 From: Jouni Malinen Date: Wed, 19 Jun 2019 01:17:54 +0300 Subject: [PATCH] Avoid use of a shadowed local variable The same len variable can be used for both needs within ieee802_1x_get_keys() to avoid compiler warning about use of shadowed variable. Fixes: 0ee6885dae04 ("macsec: Store EAP-Key-Name as eapSessionId") 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 1a9a35ba2..fe0d3d9c9 100644 --- a/src/ap/ieee802_1x.c +++ b/src/ap/ieee802_1x.c @@ -1426,7 +1426,7 @@ static void ieee802_1x_get_keys(struct hostapd_data *hapd, shared_secret_len); if (keys && keys->send && keys->recv) { - size_t len = keys->send_len + keys->recv_len; + len = keys->send_len + keys->recv_len; wpa_hexdump_key(MSG_DEBUG, "MS-MPPE-Send-Key", keys->send, keys->send_len); wpa_hexdump_key(MSG_DEBUG, "MS-MPPE-Recv-Key",