]> git.ipfire.org Git - thirdparty/hostap.git/commitdiff
Fix indentation level
authorJouni Malinen <jouni@codeaurora.org>
Fri, 30 Nov 2018 15:56:56 +0000 (17:56 +0200)
committerJouni Malinen <j@w1.fi>
Fri, 30 Nov 2018 19:28:19 +0000 (21:28 +0200)
This gets rid of smatch warnings about inconsistent indenting.

Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
src/ap/hostapd.c
src/drivers/driver_atheros.c
src/drivers/driver_nl80211_event.c
src/drivers/driver_wired.c
src/rsn_supp/tdls.c
wpa_supplicant/events.c
wpa_supplicant/sme.c

index aeeddf9389684d6546dd55f1bddeea972b8b1aa8..7501bac6e42a17b11ec1124b742de2ab078abb95 100644 (file)
@@ -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) {
index 16c2ae9190e16a7803dbf83798574e1d4cef1bce..62f5baad63612ee7ff07f439e032ea2e43b8423a 100644 (file)
@@ -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);
index bac83898db908c438081274492fc51f4464a297e..205b4cd4b0829858491592806f41516cbd148e5f 100644 (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
                         * 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;
                }
 
index 7e09dcfd40684b80cbad1a01bcd048a13574414e..c7537b7c35eb5b2f8f5db2de0d7ce2b89c42f751 100644 (file)
@@ -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);
-
-                       pos = (u8 *) (hdr + 1);
-                       left = len - sizeof(*hdr);
-                       drv_event_eapol_rx(ctx, sa, pos, left);
+       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);
                break;
 
        default:
index 14b346a6ed9b562ed5b874c4964474f4fd66e11f..345b0c84d871c6847cdf71ada47e204c4115dd91 100644 (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,
                                       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 */
        }
 
index dd6dd52676b87eddfb77f990796967863e5cf1ab..846bf009e7592b9b8d11489b0ab673567b062d81 100644 (file)
@@ -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) {
index ccc2064bcfc5e20ebf8e16ebcf0482765c313a91..2f5924e734f215873bb33ec4538dfb7c43d71a7b 100644 (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) {
                        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++;
        }