aboutsummaryrefslogtreecommitdiffstats
path: root/wpa_supplicant/events.c
diff options
context:
space:
mode:
authorJouni Malinen <jouni@qca.qualcomm.com>2012-08-29 21:37:59 (GMT)
committerJouni Malinen <j@w1.fi>2012-08-29 21:37:59 (GMT)
commit7b1aa4fe30db5020c49af87ea38a87c17256a28b (patch)
tree709d9bca077e65d8c38b3d55478d393e9dbf72d8 /wpa_supplicant/events.c
parent1f3a3ec4a4c365a340c424018c4e140698d2486a (diff)
downloadhostap-7b1aa4fe30db5020c49af87ea38a87c17256a28b.zip
hostap-7b1aa4fe30db5020c49af87ea38a87c17256a28b.tar.gz
hostap-7b1aa4fe30db5020c49af87ea38a87c17256a28b.tar.bz2
Move variable declaration into the beginning of function
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>
Diffstat (limited to 'wpa_supplicant/events.c')
-rw-r--r--wpa_supplicant/events.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/wpa_supplicant/events.c b/wpa_supplicant/events.c
index 517e11f..495fe4e 100644
--- a/wpa_supplicant/events.c
+++ b/wpa_supplicant/events.c
@@ -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;