Remove unnecessary STA_AUTOCONNECT handler function

This function could not fail and it can be replaced with a single
line variable update that takes less code than the function call.

Signed-off-by: Jouni Malinen <j@w1.fi>
This commit is contained in:
Jouni Malinen 2014-12-13 19:27:41 +02:00
parent a1144000cd
commit 5407c69d15

View file

@ -5669,14 +5669,6 @@ static int hs20_icon_request(struct wpa_supplicant *wpa_s, char *cmd)
#endif /* CONFIG_HS20 */ #endif /* CONFIG_HS20 */
static int wpa_supplicant_ctrl_iface_sta_autoconnect(
struct wpa_supplicant *wpa_s, char *cmd)
{
wpa_s->auto_reconnect_disabled = atoi(cmd) == 0 ? 1 : 0;
return 0;
}
#ifdef CONFIG_AUTOSCAN #ifdef CONFIG_AUTOSCAN
static int wpa_supplicant_ctrl_iface_autoscan(struct wpa_supplicant *wpa_s, static int wpa_supplicant_ctrl_iface_autoscan(struct wpa_supplicant *wpa_s,
@ -7475,8 +7467,7 @@ char * wpa_supplicant_ctrl_iface_process(struct wpa_supplicant *wpa_s,
if (wpa_supplicant_ctrl_iface_roam(wpa_s, buf + 5)) if (wpa_supplicant_ctrl_iface_roam(wpa_s, buf + 5))
reply_len = -1; reply_len = -1;
} else if (os_strncmp(buf, "STA_AUTOCONNECT ", 16) == 0) { } else if (os_strncmp(buf, "STA_AUTOCONNECT ", 16) == 0) {
if (wpa_supplicant_ctrl_iface_sta_autoconnect(wpa_s, buf + 16)) wpa_s->auto_reconnect_disabled = atoi(buf + 16) == 0;
reply_len = -1;
} else if (os_strncmp(buf, "BSS_EXPIRE_AGE ", 15) == 0) { } else if (os_strncmp(buf, "BSS_EXPIRE_AGE ", 15) == 0) {
if (wpa_supplicant_ctrl_iface_bss_expire_age(wpa_s, buf + 15)) if (wpa_supplicant_ctrl_iface_bss_expire_age(wpa_s, buf + 15))
reply_len = -1; reply_len = -1;