diff mbox

Remove unreachable code in p2p_stop_find

Message ID 1406910667-14686-1-git-send-email-eduardo.abinader@openbossa.org
State Accepted
Headers show

Commit Message

Eduardo Abinader Aug. 1, 2014, 4:31 p.m. UTC
As wpas_p2p_stop_find_open always returns 0, the return
check in wpas_p2p_stop_find was useless.

Signed-off-by: Eduardo Abinader <eduardo.abinader@openbossa.org>
---
 wpa_supplicant/p2p_supplicant.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

Comments

Jouni Malinen Oct. 12, 2014, 4:52 p.m. UTC | #1
On Fri, Aug 01, 2014 at 12:31:07PM -0400, Eduardo Abinader wrote:
> As wpas_p2p_stop_find_open always returns 0, the return
> check in wpas_p2p_stop_find was useless.

Thanks, applied with the return value removed as well.
diff mbox

Patch

diff --git a/wpa_supplicant/p2p_supplicant.c b/wpa_supplicant/p2p_supplicant.c
index f1269ad..cd120bc 100644
--- a/wpa_supplicant/p2p_supplicant.c
+++ b/wpa_supplicant/p2p_supplicant.c
@@ -5726,8 +5726,8 @@  static int wpas_p2p_stop_find_oper(struct wpa_supplicant *wpa_s)
 
 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);
 }