From: Jouni Malinen Date: Sat, 26 Apr 2014 08:24:24 +0000 (+0300) Subject: Remove duplicated variable zeroing X-Git-Tag: hostap_2_2~218 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=ee4fefc015ffc5d3f32dbbe38ca602b0f6900fc9;p=thirdparty%2Fhostap.git Remove duplicated variable zeroing It's enough to do this once as part of the for loop. Signed-off-by: Jouni Malinen --- diff --git a/src/ap/ieee802_11.c b/src/ap/ieee802_11.c index dbe63210f..62e2888bc 100644 --- a/src/ap/ieee802_11.c +++ b/src/ap/ieee802_11.c @@ -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++;