]> git.ipfire.org Git - thirdparty/hostap.git/commitdiff
Avoid compiler warning on shadowing a local variable
authorJouni Malinen <jouni@codeaurora.org>
Wed, 18 Dec 2019 11:46:59 +0000 (13:46 +0200)
committerJouni Malinen <j@w1.fi>
Wed, 18 Dec 2019 11:46:59 +0000 (13:46 +0200)
Fixes: 7fde39fb1a9e ("Add sae_rejected_groups to hostapd STA control interface command")
Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
src/ap/ctrl_iface_ap.c

index a0e4474a0653faa1c7e5d0e08168364d30214e38..9fd1b81a2927224bb6634b40024b9a819c8f4804 100644 (file)
@@ -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;