From 5a563a3d348170dad00e3a59489f735e246b5a25 Mon Sep 17 00:00:00 2001 From: Jouni Malinen Date: Wed, 18 Dec 2019 13:46:59 +0200 Subject: [PATCH] Avoid compiler warning on shadowing a local variable Fixes: 7fde39fb1a9e ("Add sae_rejected_groups to hostapd STA control interface command") Signed-off-by: Jouni Malinen --- src/ap/ctrl_iface_ap.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/ap/ctrl_iface_ap.c b/src/ap/ctrl_iface_ap.c index a0e4474a0..9fd1b81a2 100644 --- a/src/ap/ctrl_iface_ap.c +++ b/src/ap/ctrl_iface_ap.c @@ -276,7 +276,7 @@ static int hostapd_ctrl_iface_sta_mib(struct hostapd_data *hapd, if (sta->sae && sta->sae->tmp) { const u8 *pos; - unsigned int i, count; + unsigned int j, count; struct wpabuf *groups = sta->sae->tmp->peer_rejected_groups; res = os_snprintf(buf + len, buflen - len, @@ -291,9 +291,9 @@ static int hostapd_ctrl_iface_sta_mib(struct hostapd_data *hapd, pos = NULL; count = 0; } - for (i = 0; pos && i < count; i++) { + for (j = 0; pos && j < count; j++) { res = os_snprintf(buf + len, buflen - len, "%s%d", - i == 0 ? "" : " ", WPA_GET_LE16(pos)); + j == 0 ? "" : " ", WPA_GET_LE16(pos)); if (!os_snprintf_error(buflen - len, res)) len += res; pos += 2;