WPS ER: Remove unnecessary return value
authorJouni Malinen <j@w1.fi>
Sat, 13 Dec 2014 17:50:16 +0000 (19:50 +0200)
committerJouni Malinen <j@w1.fi>
Sun, 14 Dec 2014 00:28:03 +0000 (02:28 +0200)
wps_er_deinit() cannot fail and it does not return anything, so neither
should wpas_wps_er_stop().

Signed-off-by: Jouni Malinen <j@w1.fi>
wpa_supplicant/ctrl_iface.c
wpa_supplicant/wps_supplicant.c
wpa_supplicant/wps_supplicant.h

index 86dccde..34cbe74 100644 (file)
@@ -7135,8 +7135,7 @@ char * wpa_supplicant_ctrl_iface_process(struct wpa_supplicant *wpa_s,
                if (wpas_wps_er_start(wpa_s, buf + 13))
                        reply_len = -1;
        } else if (os_strcmp(buf, "WPS_ER_STOP") == 0) {
-               if (wpas_wps_er_stop(wpa_s))
-                       reply_len = -1;
+               wpas_wps_er_stop(wpa_s);
        } else if (os_strncmp(buf, "WPS_ER_PIN ", 11) == 0) {
                if (wpa_supplicant_ctrl_iface_wps_er_pin(wpa_s, buf + 11))
                        reply_len = -1;
index d8ceb5b..0359cde 100644 (file)
@@ -1809,13 +1809,12 @@ int wpas_wps_er_start(struct wpa_supplicant *wpa_s, const char *filter)
 }
 
 
-int wpas_wps_er_stop(struct wpa_supplicant *wpa_s)
+void wpas_wps_er_stop(struct wpa_supplicant *wpa_s)
 {
 #ifdef CONFIG_WPS_ER
        wps_er_deinit(wpa_s->wps_er, NULL, NULL);
        wpa_s->wps_er = NULL;
 #endif /* CONFIG_WPS_ER */
-       return 0;
 }
 
 
index 2263512..683bd50 100644 (file)
@@ -47,7 +47,7 @@ int wpas_wps_searching(struct wpa_supplicant *wpa_s);
 int wpas_wps_scan_result_text(const u8 *ies, size_t ies_len, char *pos,
                              char *end);
 int wpas_wps_er_start(struct wpa_supplicant *wpa_s, const char *filter);
-int wpas_wps_er_stop(struct wpa_supplicant *wpa_s);
+void wpas_wps_er_stop(struct wpa_supplicant *wpa_s);
 int wpas_wps_er_add_pin(struct wpa_supplicant *wpa_s, const u8 *addr,
                        const char *uuid, const char *pin);
 int wpas_wps_er_pbc(struct wpa_supplicant *wpa_s, const char *uuid);