From 5407c69d1536b550e46acf9324ca16b03c7f95c9 Mon Sep 17 00:00:00 2001 From: Jouni Malinen Date: Sat, 13 Dec 2014 19:27:41 +0200 Subject: [PATCH] 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 --- wpa_supplicant/ctrl_iface.c | 11 +---------- 1 file changed, 1 insertion(+), 10 deletions(-) diff --git a/wpa_supplicant/ctrl_iface.c b/wpa_supplicant/ctrl_iface.c index 6fe45de1e..86dccdede 100644 --- a/wpa_supplicant/ctrl_iface.c +++ b/wpa_supplicant/ctrl_iface.c @@ -5669,14 +5669,6 @@ static int hs20_icon_request(struct wpa_supplicant *wpa_s, char *cmd) #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 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)) reply_len = -1; } else if (os_strncmp(buf, "STA_AUTOCONNECT ", 16) == 0) { - if (wpa_supplicant_ctrl_iface_sta_autoconnect(wpa_s, buf + 16)) - reply_len = -1; + wpa_s->auto_reconnect_disabled = atoi(buf + 16) == 0; } else if (os_strncmp(buf, "BSS_EXPIRE_AGE ", 15) == 0) { if (wpa_supplicant_ctrl_iface_bss_expire_age(wpa_s, buf + 15)) reply_len = -1;