aboutsummaryrefslogtreecommitdiffstats
path: root/wpa_supplicant
diff options
context:
space:
mode:
authorJouni Malinen <j@w1.fi>2016-05-22 14:44:28 (GMT)
committerJouni Malinen <j@w1.fi>2016-05-22 14:44:28 (GMT)
commit88802405f321d5527f1cf11d219bea3d41e76d1c (patch)
tree5f2e16f700dfe24379fce30ccd22724ff3bcea36 /wpa_supplicant
parente1ae2876d5851658feb91d0b3616738722edb05c (diff)
downloadhostap-88802405f321d5527f1cf11d219bea3d41e76d1c.zip
hostap-88802405f321d5527f1cf11d219bea3d41e76d1c.tar.gz
hostap-88802405f321d5527f1cf11d219bea3d41e76d1c.tar.bz2
scan: Clean up code a bit - phase1 is used in all WPS cases
There is no need to have a separate if statement to skip the cases where phase1 is not set. Just check it with the strstr comparison since this case is not really used in practice. Signed-off-by: Jouni Malinen <j@w1.fi>
Diffstat (limited to 'wpa_supplicant')
-rw-r--r--wpa_supplicant/scan.c5
1 files changed, 1 insertions, 4 deletions
diff --git a/wpa_supplicant/scan.c b/wpa_supplicant/scan.c
index bfee756..9a3c4c9 100644
--- a/wpa_supplicant/scan.c
+++ b/wpa_supplicant/scan.c
@@ -59,10 +59,7 @@ static int wpas_wps_in_use(struct wpa_supplicant *wpa_s,
wps = 1;
*req_type = wpas_wps_get_req_type(ssid);
- if (!ssid->eap.phase1)
- continue;
-
- if (os_strstr(ssid->eap.phase1, "pbc=1"))
+ if (ssid->eap.phase1 && os_strstr(ssid->eap.phase1, "pbc=1"))
return 2;
}