aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEduardo Abinader <eduardo.abinader@openbossa.org>2014-08-01 12:31:07 -0400
committerGerrit - the friendly Code Review server <code-review@localhost>2014-11-05 07:35:38 -0800
commit54f7321493d7a1241706b79702d6447012bd7a60 (patch)
treeda5021edd6b90e54a36165758565319b0ede64b8
parentc0c6db17999ba1ec4a6b4fc691981bbc2d6ba4f9 (diff)
downloadandroid_external_wpa_supplicant_8-54f7321493d7a1241706b79702d6447012bd7a60.tar.gz
android_external_wpa_supplicant_8-54f7321493d7a1241706b79702d6447012bd7a60.tar.bz2
android_external_wpa_supplicant_8-54f7321493d7a1241706b79702d6447012bd7a60.zip
P2P: Remove unreachable code in wpas_p2p_stop_find()
Commit 152cff6ba6d6ac206b93a2202eab57f0a36c26cb ('P2P: Remove WPA_DRIVER_FLAGS_P2P_MGMT option') removed the only non-zero return from wpas_p2p_stop_find_oper(), but did not remove the useless return value or the return check in wpas_p2p_stop_find(). Clean these up by removing unreachable code and useless return value. Change-Id: I36bc270b154e25adef9256c07977515012eed6a8 CRs-fixed: 750852 Git-commit: 477b082cc4e9cb2025dba83bab6f9eed47eefc05 Git-repo: git://w1.fi/srv/git/hostap.git Signed-off-by: Eduardo Abinader <eduardo.abinader@openbossa.org>
-rw-r--r--wpa_supplicant/p2p_supplicant.c9
1 files changed, 3 insertions, 6 deletions
diff --git a/wpa_supplicant/p2p_supplicant.c b/wpa_supplicant/p2p_supplicant.c
index 878ff682..0daa2329 100644
--- a/wpa_supplicant/p2p_supplicant.c
+++ b/wpa_supplicant/p2p_supplicant.c
@@ -119,7 +119,7 @@ static void wpas_p2p_group_formation_timeout(void *eloop_ctx,
static void wpas_p2p_group_freq_conflict(void *eloop_ctx, void *timeout_ctx);
static void wpas_p2p_fallback_to_go_neg(struct wpa_supplicant *wpa_s,
int group_added);
-static int wpas_p2p_stop_find_oper(struct wpa_supplicant *wpa_s);
+static void wpas_p2p_stop_find_oper(struct wpa_supplicant *wpa_s);
static void wpas_stop_listen(void *ctx);
static void wpas_p2p_psk_failure_removal(void *eloop_ctx, void *timeout_ctx);
static void wpas_p2p_group_deinit(struct wpa_supplicant *wpa_s);
@@ -5759,7 +5759,7 @@ int wpas_p2p_find(struct wpa_supplicant *wpa_s, unsigned int timeout,
}
-static int wpas_p2p_stop_find_oper(struct wpa_supplicant *wpa_s)
+static void wpas_p2p_stop_find_oper(struct wpa_supplicant *wpa_s)
{
wpas_p2p_clear_pending_action_tx(wpa_s);
wpa_s->p2p_long_listen = 0;
@@ -5768,15 +5768,12 @@ static int wpas_p2p_stop_find_oper(struct wpa_supplicant *wpa_s)
if (wpa_s->global->p2p)
p2p_stop_find(wpa_s->global->p2p);
-
- return 0;
}
void wpas_p2p_stop_find(struct wpa_supplicant *wpa_s)
{
- if (wpas_p2p_stop_find_oper(wpa_s) > 0)
- return;
+ wpas_p2p_stop_find_oper(wpa_s);
wpas_p2p_remove_pending_group_interface(wpa_s);
}