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>
This commit is contained in:
parent
e1ae2876d5
commit
88802405f3
1 changed files with 1 additions and 4 deletions
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue