mirror of
https://github.com/vanhoefm/fragattacks.git
synced 2024-11-28 18:28:23 -05:00
P2P: Remove unreachable code in wpas_p2p_stop_find()
Commit 152cff6ba6
('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.
Signed-off-by: Eduardo Abinader <eduardo.abinader@openbossa.org>
This commit is contained in:
parent
3f08d1cde8
commit
a62941415a
@ -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_group_freq_conflict(void *eloop_ctx, void *timeout_ctx);
|
||||||
static void wpas_p2p_fallback_to_go_neg(struct wpa_supplicant *wpa_s,
|
static void wpas_p2p_fallback_to_go_neg(struct wpa_supplicant *wpa_s,
|
||||||
int group_added);
|
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_stop_listen(void *ctx);
|
||||||
static void wpas_p2p_psk_failure_removal(void *eloop_ctx, void *timeout_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);
|
static void wpas_p2p_group_deinit(struct wpa_supplicant *wpa_s);
|
||||||
@ -5773,7 +5773,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);
|
wpas_p2p_clear_pending_action_tx(wpa_s);
|
||||||
wpa_s->p2p_long_listen = 0;
|
wpa_s->p2p_long_listen = 0;
|
||||||
@ -5782,15 +5782,12 @@ static int wpas_p2p_stop_find_oper(struct wpa_supplicant *wpa_s)
|
|||||||
|
|
||||||
if (wpa_s->global->p2p)
|
if (wpa_s->global->p2p)
|
||||||
p2p_stop_find(wpa_s->global->p2p);
|
p2p_stop_find(wpa_s->global->p2p);
|
||||||
|
|
||||||
return 0;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void wpas_p2p_stop_find(struct wpa_supplicant *wpa_s)
|
void wpas_p2p_stop_find(struct wpa_supplicant *wpa_s)
|
||||||
{
|
{
|
||||||
if (wpas_p2p_stop_find_oper(wpa_s) > 0)
|
wpas_p2p_stop_find_oper(wpa_s);
|
||||||
return;
|
|
||||||
wpas_p2p_remove_pending_group_interface(wpa_s);
|
wpas_p2p_remove_pending_group_interface(wpa_s);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user