]> git.ipfire.org Git - thirdparty/hostap.git/commitdiff
Remove duplicated variable zeroing
authorJouni Malinen <j@w1.fi>
Sat, 26 Apr 2014 08:24:24 +0000 (11:24 +0300)
committerJouni Malinen <j@w1.fi>
Tue, 29 Apr 2014 09:52:10 +0000 (12:52 +0300)
It's enough to do this once as part of the for loop.

Signed-off-by: Jouni Malinen <j@w1.fi>
src/ap/ieee802_11.c

index dbe63210fc3d82ff16d93586e453362884b135c2..62e2888bcc77c8af827e7a98ff869e52ae18bbc6 100644 (file)
@@ -62,7 +62,6 @@ u8 * hostapd_eid_supp_rates(struct hostapd_data *hapd, u8 *eid)
        }
 
        *pos++ = num;
-       count = 0;
        for (i = 0, count = 0; i < hapd->iface->num_rates && count < num;
             i++) {
                count++;
@@ -105,7 +104,6 @@ u8 * hostapd_eid_ext_supp_rates(struct hostapd_data *hapd, u8 *eid)
 
        *pos++ = WLAN_EID_EXT_SUPP_RATES;
        *pos++ = num;
-       count = 0;
        for (i = 0, count = 0; i < hapd->iface->num_rates && count < num + 8;
             i++) {
                count++;