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:
Jouni Malinen 2018-11-30 17:56:56 +02:00 committed by Jouni Malinen
parent 3337fc2a12
commit 3d1d469195
7 changed files with 29 additions and 30 deletions

View File

@ -2730,7 +2730,7 @@ hostapd_config_alloc(struct hapd_interfaces *interfaces, const char *ifname,
if (conf == NULL) { if (conf == NULL) {
wpa_printf(MSG_ERROR, "%s: Failed to allocate memory for " wpa_printf(MSG_ERROR, "%s: Failed to allocate memory for "
"configuration", __func__); "configuration", __func__);
return NULL; return NULL;
} }
if (driver) { if (driver) {

View File

@ -1329,11 +1329,11 @@ atheros_wireless_event_wireless_custom(struct atheros_driver_data *drv,
} }
atheros_raw_receive(drv, NULL, atheros_raw_receive(drv, NULL,
(u8 *) custom + MGMT_FRAM_TAG_SIZE, len); (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 */ /* Format: "Manage.auth <frame len>" | zero padding | frame */
int len = atoi(custom + 12); int len = atoi(custom + 12);
if (len < 0 || if (len < 0 ||
MGMT_FRAM_TAG_SIZE + len > end - custom) { MGMT_FRAM_TAG_SIZE + len > end - custom) {
wpa_printf(MSG_DEBUG, wpa_printf(MSG_DEBUG,
"Invalid Manage.auth event length %d", len); "Invalid Manage.auth event length %d", len);
return; return;
@ -1342,7 +1342,7 @@ atheros_wireless_event_wireless_custom(struct atheros_driver_data *drv,
(u8 *) custom + MGMT_FRAM_TAG_SIZE, len); (u8 *) custom + MGMT_FRAM_TAG_SIZE, len);
#endif /* CONFIG_IEEE80211W || CONFIG_IEEE80211R || CONFIG_FILS */ #endif /* CONFIG_IEEE80211W || CONFIG_IEEE80211R || CONFIG_FILS */
#ifdef ATHEROS_USE_RAW_RECEIVE #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 /* Format: "Manage.assoc_req <frame len>" | zero padding | frame
*/ */
int len = atoi(custom + 14); int len = atoi(custom + 14);

View File

@ -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 * disconnection event for the old AP may show up after
* we have started connection with the new AP. * we have started connection with the new AP.
*/ */
wpa_printf(MSG_DEBUG, wpa_printf(MSG_DEBUG,
"nl80211: Ignore deauth/disassoc event from old AP " "nl80211: Ignore deauth/disassoc event from old AP "
MACSTR MACSTR
" when already connecting with " MACSTR, " when already connecting with " MACSTR,
MAC2STR(bssid), MAC2STR(bssid),
MAC2STR(drv->auth_attempt_bssid)); MAC2STR(drv->auth_attempt_bssid));
return; return;
} }

View File

@ -96,16 +96,16 @@ static void handle_data(void *ctx, unsigned char *buf, size_t len)
hdr = (struct ieee8023_hdr *) buf; hdr = (struct ieee8023_hdr *) buf;
switch (ntohs(hdr->ethertype)) { switch (ntohs(hdr->ethertype)) {
case ETH_P_PAE: case ETH_P_PAE:
wpa_printf(MSG_MSGDUMP, "Received EAPOL packet"); wpa_printf(MSG_MSGDUMP, "Received EAPOL packet");
sa = hdr->src; sa = hdr->src;
os_memset(&event, 0, sizeof(event)); os_memset(&event, 0, sizeof(event));
event.new_sta.addr = sa; event.new_sta.addr = sa;
wpa_supplicant_event(ctx, EVENT_NEW_STA, &event); wpa_supplicant_event(ctx, EVENT_NEW_STA, &event);
pos = (u8 *) (hdr + 1); pos = (u8 *) (hdr + 1);
left = len - sizeof(*hdr); left = len - sizeof(*hdr);
drv_event_eapol_rx(ctx, sa, pos, left); drv_event_eapol_rx(ctx, sa, pos, left);
break; break;
default: default:

View File

@ -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, eloop_register_timeout(lifetime, 0, wpa_tdls_tpk_timeout,
sm, peer); sm, peer);
#ifdef CONFIG_TDLS_TESTING #ifdef CONFIG_TDLS_TESTING
if (tdls_testing & TDLS_TESTING_NO_TPK_EXPIRATION) { if (tdls_testing & TDLS_TESTING_NO_TPK_EXPIRATION) {
wpa_printf(MSG_DEBUG, "TDLS: Testing - disable TPK " wpa_printf(MSG_DEBUG,
"expiration"); "TDLS: Testing - disable TPK expiration");
eloop_cancel_timeout(wpa_tdls_tpk_timeout, sm, peer); eloop_cancel_timeout(wpa_tdls_tpk_timeout, sm, peer);
} }
#endif /* CONFIG_TDLS_TESTING */ #endif /* CONFIG_TDLS_TESTING */
} }

View File

@ -4031,6 +4031,9 @@ void wpa_supplicant_event(void *ctx, enum wpa_event_type event,
{ {
struct wpa_supplicant *wpa_s = ctx; struct wpa_supplicant *wpa_s = ctx;
int resched; int resched;
#ifndef CONFIG_NO_STDOUT_DEBUG
int level = MSG_DEBUG;
#endif /* CONFIG_NO_STDOUT_DEBUG */
if (wpa_s->wpa_state == WPA_INTERFACE_DISABLED && if (wpa_s->wpa_state == WPA_INTERFACE_DISABLED &&
event != EVENT_INTERFACE_ENABLED && event != EVENT_INTERFACE_ENABLED &&
@ -4044,9 +4047,6 @@ void wpa_supplicant_event(void *ctx, enum wpa_event_type event,
} }
#ifndef CONFIG_NO_STDOUT_DEBUG #ifndef CONFIG_NO_STDOUT_DEBUG
{
int level = MSG_DEBUG;
if (event == EVENT_RX_MGMT && data->rx_mgmt.frame_len >= 24) { if (event == EVENT_RX_MGMT && data->rx_mgmt.frame_len >= 24) {
const struct ieee80211_hdr *hdr; const struct ieee80211_hdr *hdr;
u16 fc; 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", wpa_dbg(wpa_s, level, "Event %s (%d) received",
event_to_string(event), event); event_to_string(event), event);
}
#endif /* CONFIG_NO_STDOUT_DEBUG */ #endif /* CONFIG_NO_STDOUT_DEBUG */
switch (event) { switch (event) {

View File

@ -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) { if (sae_set_group(&wpa_s->sme.sae, group) == 0) {
wpa_dbg(wpa_s, MSG_DEBUG, "SME: Selected SAE group %d", wpa_dbg(wpa_s, MSG_DEBUG, "SME: Selected SAE group %d",
wpa_s->sme.sae.group); wpa_s->sme.sae.group);
return 0; return 0;
} }
wpa_s->sme.sae_group_index++; wpa_s->sme.sae_group_index++;
} }