Fix indentation level
This gets rid of smatch warnings about inconsistent indenting. Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
This commit is contained in:
parent
3337fc2a12
commit
3d1d469195
7 changed files with 29 additions and 30 deletions
|
@ -2730,7 +2730,7 @@ hostapd_config_alloc(struct hapd_interfaces *interfaces, const char *ifname,
|
|||
if (conf == NULL) {
|
||||
wpa_printf(MSG_ERROR, "%s: Failed to allocate memory for "
|
||||
"configuration", __func__);
|
||||
return NULL;
|
||||
return NULL;
|
||||
}
|
||||
|
||||
if (driver) {
|
||||
|
|
|
@ -1329,11 +1329,11 @@ atheros_wireless_event_wireless_custom(struct atheros_driver_data *drv,
|
|||
}
|
||||
atheros_raw_receive(drv, NULL,
|
||||
(u8 *) custom + MGMT_FRAM_TAG_SIZE, len);
|
||||
} else if (os_strncmp(custom, "Manage.auth ", 12) == 0) {
|
||||
} else if (os_strncmp(custom, "Manage.auth ", 12) == 0) {
|
||||
/* Format: "Manage.auth <frame len>" | zero padding | frame */
|
||||
int len = atoi(custom + 12);
|
||||
if (len < 0 ||
|
||||
MGMT_FRAM_TAG_SIZE + len > end - custom) {
|
||||
if (len < 0 ||
|
||||
MGMT_FRAM_TAG_SIZE + len > end - custom) {
|
||||
wpa_printf(MSG_DEBUG,
|
||||
"Invalid Manage.auth event length %d", len);
|
||||
return;
|
||||
|
@ -1342,7 +1342,7 @@ atheros_wireless_event_wireless_custom(struct atheros_driver_data *drv,
|
|||
(u8 *) custom + MGMT_FRAM_TAG_SIZE, len);
|
||||
#endif /* CONFIG_IEEE80211W || CONFIG_IEEE80211R || CONFIG_FILS */
|
||||
#ifdef ATHEROS_USE_RAW_RECEIVE
|
||||
} else if (os_strncmp(custom, "Manage.action ", 14) == 0) {
|
||||
} else if (os_strncmp(custom, "Manage.action ", 14) == 0) {
|
||||
/* Format: "Manage.assoc_req <frame len>" | zero padding | frame
|
||||
*/
|
||||
int len = atoi(custom + 14);
|
||||
|
|
|
@ -754,12 +754,12 @@ static void mlme_event_deauth_disassoc(struct wpa_driver_nl80211_data *drv,
|
|||
* disconnection event for the old AP may show up after
|
||||
* we have started connection with the new AP.
|
||||
*/
|
||||
wpa_printf(MSG_DEBUG,
|
||||
"nl80211: Ignore deauth/disassoc event from old AP "
|
||||
MACSTR
|
||||
" when already connecting with " MACSTR,
|
||||
MAC2STR(bssid),
|
||||
MAC2STR(drv->auth_attempt_bssid));
|
||||
wpa_printf(MSG_DEBUG,
|
||||
"nl80211: Ignore deauth/disassoc event from old AP "
|
||||
MACSTR
|
||||
" when already connecting with " MACSTR,
|
||||
MAC2STR(bssid),
|
||||
MAC2STR(drv->auth_attempt_bssid));
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
|
@ -96,16 +96,16 @@ static void handle_data(void *ctx, unsigned char *buf, size_t len)
|
|||
hdr = (struct ieee8023_hdr *) buf;
|
||||
|
||||
switch (ntohs(hdr->ethertype)) {
|
||||
case ETH_P_PAE:
|
||||
wpa_printf(MSG_MSGDUMP, "Received EAPOL packet");
|
||||
sa = hdr->src;
|
||||
os_memset(&event, 0, sizeof(event));
|
||||
event.new_sta.addr = sa;
|
||||
wpa_supplicant_event(ctx, EVENT_NEW_STA, &event);
|
||||
case ETH_P_PAE:
|
||||
wpa_printf(MSG_MSGDUMP, "Received EAPOL packet");
|
||||
sa = hdr->src;
|
||||
os_memset(&event, 0, sizeof(event));
|
||||
event.new_sta.addr = sa;
|
||||
wpa_supplicant_event(ctx, EVENT_NEW_STA, &event);
|
||||
|
||||
pos = (u8 *) (hdr + 1);
|
||||
left = len - sizeof(*hdr);
|
||||
drv_event_eapol_rx(ctx, sa, pos, left);
|
||||
pos = (u8 *) (hdr + 1);
|
||||
left = len - sizeof(*hdr);
|
||||
drv_event_eapol_rx(ctx, sa, pos, left);
|
||||
break;
|
||||
|
||||
default:
|
||||
|
|
|
@ -2159,11 +2159,11 @@ static int wpa_tdls_enable_link(struct wpa_sm *sm, struct wpa_tdls_peer *peer)
|
|||
eloop_register_timeout(lifetime, 0, wpa_tdls_tpk_timeout,
|
||||
sm, peer);
|
||||
#ifdef CONFIG_TDLS_TESTING
|
||||
if (tdls_testing & TDLS_TESTING_NO_TPK_EXPIRATION) {
|
||||
wpa_printf(MSG_DEBUG, "TDLS: Testing - disable TPK "
|
||||
"expiration");
|
||||
eloop_cancel_timeout(wpa_tdls_tpk_timeout, sm, peer);
|
||||
}
|
||||
if (tdls_testing & TDLS_TESTING_NO_TPK_EXPIRATION) {
|
||||
wpa_printf(MSG_DEBUG,
|
||||
"TDLS: Testing - disable TPK expiration");
|
||||
eloop_cancel_timeout(wpa_tdls_tpk_timeout, sm, peer);
|
||||
}
|
||||
#endif /* CONFIG_TDLS_TESTING */
|
||||
}
|
||||
|
||||
|
|
|
@ -4031,6 +4031,9 @@ void wpa_supplicant_event(void *ctx, enum wpa_event_type event,
|
|||
{
|
||||
struct wpa_supplicant *wpa_s = ctx;
|
||||
int resched;
|
||||
#ifndef CONFIG_NO_STDOUT_DEBUG
|
||||
int level = MSG_DEBUG;
|
||||
#endif /* CONFIG_NO_STDOUT_DEBUG */
|
||||
|
||||
if (wpa_s->wpa_state == WPA_INTERFACE_DISABLED &&
|
||||
event != EVENT_INTERFACE_ENABLED &&
|
||||
|
@ -4044,9 +4047,6 @@ void wpa_supplicant_event(void *ctx, enum wpa_event_type event,
|
|||
}
|
||||
|
||||
#ifndef CONFIG_NO_STDOUT_DEBUG
|
||||
{
|
||||
int level = MSG_DEBUG;
|
||||
|
||||
if (event == EVENT_RX_MGMT && data->rx_mgmt.frame_len >= 24) {
|
||||
const struct ieee80211_hdr *hdr;
|
||||
u16 fc;
|
||||
|
@ -4059,7 +4059,6 @@ void wpa_supplicant_event(void *ctx, enum wpa_event_type event,
|
|||
|
||||
wpa_dbg(wpa_s, level, "Event %s (%d) received",
|
||||
event_to_string(event), event);
|
||||
}
|
||||
#endif /* CONFIG_NO_STDOUT_DEBUG */
|
||||
|
||||
switch (event) {
|
||||
|
|
|
@ -72,7 +72,7 @@ static int sme_set_sae_group(struct wpa_supplicant *wpa_s)
|
|||
if (sae_set_group(&wpa_s->sme.sae, group) == 0) {
|
||||
wpa_dbg(wpa_s, MSG_DEBUG, "SME: Selected SAE group %d",
|
||||
wpa_s->sme.sae.group);
|
||||
return 0;
|
||||
return 0;
|
||||
}
|
||||
wpa_s->sme.sae_group_index++;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue