Do not use C++ reserved words as variable names

Signed-off-by: Jouni Malinen <j@w1.fi>
This commit is contained in:
Jouni Malinen 2015-04-26 13:09:47 +03:00
parent eaa3728a64
commit a6da824b19
3 changed files with 24 additions and 24 deletions

View file

@ -1285,7 +1285,7 @@ static void ieee802_1x_store_radius_class(struct hostapd_data *hapd,
struct sta_info *sta, struct sta_info *sta,
struct radius_msg *msg) struct radius_msg *msg)
{ {
u8 *class; u8 *attr_class;
size_t class_len; size_t class_len;
struct eapol_state_machine *sm = sta->eapol_sm; struct eapol_state_machine *sm = sta->eapol_sm;
int count, i; int count, i;
@ -1307,12 +1307,12 @@ static void ieee802_1x_store_radius_class(struct hostapd_data *hapd,
nclass_count = 0; nclass_count = 0;
class = NULL; attr_class = NULL;
for (i = 0; i < count; i++) { for (i = 0; i < count; i++) {
do { do {
if (radius_msg_get_attr_ptr(msg, RADIUS_ATTR_CLASS, if (radius_msg_get_attr_ptr(msg, RADIUS_ATTR_CLASS,
&class, &class_len, &attr_class, &class_len,
class) < 0) { attr_class) < 0) {
i = count; i = count;
break; break;
} }
@ -1322,7 +1322,7 @@ static void ieee802_1x_store_radius_class(struct hostapd_data *hapd,
if (nclass[nclass_count].data == NULL) if (nclass[nclass_count].data == NULL)
break; break;
os_memcpy(nclass[nclass_count].data, class, class_len); os_memcpy(nclass[nclass_count].data, attr_class, class_len);
nclass[nclass_count].len = class_len; nclass[nclass_count].len = class_len;
nclass_count++; nclass_count++;
} }
@ -2342,9 +2342,9 @@ void ieee802_1x_notify_pre_auth(struct eapol_state_machine *sm, int pre_auth)
} }
static const char * bool_txt(Boolean bool) static const char * bool_txt(Boolean val)
{ {
return bool ? "TRUE" : "FALSE"; return val ? "TRUE" : "FALSE";
} }

View file

@ -2994,9 +2994,9 @@ void wpa_gtk_rekey(struct wpa_authenticator *wpa_auth)
} }
static const char * wpa_bool_txt(int bool) static const char * wpa_bool_txt(int val)
{ {
return bool ? "TRUE" : "FALSE"; return val ? "TRUE" : "FALSE";
} }

View file

@ -398,7 +398,7 @@ static struct wpa_bss * wpa_bss_add(struct wpa_supplicant *wpa_s,
static int are_ies_equal(const struct wpa_bss *old, static int are_ies_equal(const struct wpa_bss *old,
const struct wpa_scan_res *new, u32 ie) const struct wpa_scan_res *new_res, u32 ie)
{ {
const u8 *old_ie, *new_ie; const u8 *old_ie, *new_ie;
struct wpabuf *old_ie_buff = NULL; struct wpabuf *old_ie_buff = NULL;
@ -408,19 +408,19 @@ static int are_ies_equal(const struct wpa_bss *old,
switch (ie) { switch (ie) {
case WPA_IE_VENDOR_TYPE: case WPA_IE_VENDOR_TYPE:
old_ie = wpa_bss_get_vendor_ie(old, ie); old_ie = wpa_bss_get_vendor_ie(old, ie);
new_ie = wpa_scan_get_vendor_ie(new, ie); new_ie = wpa_scan_get_vendor_ie(new_res, ie);
is_multi = 0; is_multi = 0;
break; break;
case WPS_IE_VENDOR_TYPE: case WPS_IE_VENDOR_TYPE:
old_ie_buff = wpa_bss_get_vendor_ie_multi(old, ie); old_ie_buff = wpa_bss_get_vendor_ie_multi(old, ie);
new_ie_buff = wpa_scan_get_vendor_ie_multi(new, ie); new_ie_buff = wpa_scan_get_vendor_ie_multi(new_res, ie);
is_multi = 1; is_multi = 1;
break; break;
case WLAN_EID_RSN: case WLAN_EID_RSN:
case WLAN_EID_SUPP_RATES: case WLAN_EID_SUPP_RATES:
case WLAN_EID_EXT_SUPP_RATES: case WLAN_EID_EXT_SUPP_RATES:
old_ie = wpa_bss_get_ie(old, ie); old_ie = wpa_bss_get_ie(old, ie);
new_ie = wpa_scan_get_ie(new, ie); new_ie = wpa_scan_get_ie(new_res, ie);
is_multi = 0; is_multi = 0;
break; break;
default: default:
@ -454,15 +454,15 @@ static int are_ies_equal(const struct wpa_bss *old,
static u32 wpa_bss_compare_res(const struct wpa_bss *old, static u32 wpa_bss_compare_res(const struct wpa_bss *old,
const struct wpa_scan_res *new) const struct wpa_scan_res *new_res)
{ {
u32 changes = 0; u32 changes = 0;
int caps_diff = old->caps ^ new->caps; int caps_diff = old->caps ^ new_res->caps;
if (old->freq != new->freq) if (old->freq != new_res->freq)
changes |= WPA_BSS_FREQ_CHANGED_FLAG; changes |= WPA_BSS_FREQ_CHANGED_FLAG;
if (old->level != new->level) if (old->level != new_res->level)
changes |= WPA_BSS_SIGNAL_CHANGED_FLAG; changes |= WPA_BSS_SIGNAL_CHANGED_FLAG;
if (caps_diff & IEEE80211_CAP_PRIVACY) if (caps_diff & IEEE80211_CAP_PRIVACY)
@ -471,22 +471,22 @@ static u32 wpa_bss_compare_res(const struct wpa_bss *old,
if (caps_diff & IEEE80211_CAP_IBSS) if (caps_diff & IEEE80211_CAP_IBSS)
changes |= WPA_BSS_MODE_CHANGED_FLAG; changes |= WPA_BSS_MODE_CHANGED_FLAG;
if (old->ie_len == new->ie_len && if (old->ie_len == new_res->ie_len &&
os_memcmp(old + 1, new + 1, old->ie_len) == 0) os_memcmp(old + 1, new_res + 1, old->ie_len) == 0)
return changes; return changes;
changes |= WPA_BSS_IES_CHANGED_FLAG; changes |= WPA_BSS_IES_CHANGED_FLAG;
if (!are_ies_equal(old, new, WPA_IE_VENDOR_TYPE)) if (!are_ies_equal(old, new_res, WPA_IE_VENDOR_TYPE))
changes |= WPA_BSS_WPAIE_CHANGED_FLAG; changes |= WPA_BSS_WPAIE_CHANGED_FLAG;
if (!are_ies_equal(old, new, WLAN_EID_RSN)) if (!are_ies_equal(old, new_res, WLAN_EID_RSN))
changes |= WPA_BSS_RSNIE_CHANGED_FLAG; changes |= WPA_BSS_RSNIE_CHANGED_FLAG;
if (!are_ies_equal(old, new, WPS_IE_VENDOR_TYPE)) if (!are_ies_equal(old, new_res, WPS_IE_VENDOR_TYPE))
changes |= WPA_BSS_WPS_CHANGED_FLAG; changes |= WPA_BSS_WPS_CHANGED_FLAG;
if (!are_ies_equal(old, new, WLAN_EID_SUPP_RATES) || if (!are_ies_equal(old, new_res, WLAN_EID_SUPP_RATES) ||
!are_ies_equal(old, new, WLAN_EID_EXT_SUPP_RATES)) !are_ies_equal(old, new_res, WLAN_EID_EXT_SUPP_RATES))
changes |= WPA_BSS_RATES_CHANGED_FLAG; changes |= WPA_BSS_RATES_CHANGED_FLAG;
return changes; return changes;