]> git.ipfire.org Git - thirdparty/hostap.git/commitdiff
Move variable declaration into the beginning of function
authorJouni Malinen <jouni@qca.qualcomm.com>
Wed, 29 Aug 2012 21:37:59 +0000 (00:37 +0300)
committerJouni Malinen <j@w1.fi>
Wed, 29 Aug 2012 21:37:59 +0000 (00:37 +0300)
The variables used within the #ifndef block here needs to be defined in
the beginning of the function to avoid issues with some compilers.

Signed-hostap: Jouni Malinen <jouni@qca.qualcomm.com>

wpa_supplicant/events.c

index 517e11f725387e6f0a8e87ef25c7b5ca4b7671a8..495fe4ed5feedf69b469616694096f3b9c3e4e0d 100644 (file)
@@ -1054,6 +1054,9 @@ static int _wpa_supplicant_event_scan_results(struct wpa_supplicant *wpa_s,
        struct wpa_ssid *ssid = NULL;
        struct wpa_scan_results *scan_res;
        int ap = 0;
+#ifndef CONFIG_NO_RANDOM_POOL
+       size_t i, num;
+#endif /* CONFIG_NO_RANDOM_POOL */
 
 #ifdef CONFIG_AP
        if (wpa_s->ap_iface)
@@ -1088,7 +1091,6 @@ static int _wpa_supplicant_event_scan_results(struct wpa_supplicant *wpa_s,
        }
 
 #ifndef CONFIG_NO_RANDOM_POOL
-       size_t i, num;
        num = scan_res->num;
        if (num > 10)
                num = 10;