From: Max Stepanov Date: Thu, 2 Jul 2015 07:45:00 +0000 (+0300) Subject: P2P: Delete redundant comparison in p2p_process_prov_disc_resp() X-Git-Tag: hostap_2_5~452 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=20f4c3d76bd5ee0fd6a2c10e1fd38b6b8832d25e;p=thirdparty%2Fhostap.git P2P: Delete redundant comparison in p2p_process_prov_disc_resp() Delete redundant comparison of msg.wps_config_methods with dev->req_config_methods in p2p_process_prov_disc_resp() since it's already done early in this function. Also, the second comparison doesn't make too much sense: it can happen after a possible p2p_reset_pending_pd() call setting dev->req_config_methods to 0. Signed-off-by: Max Stepanov Reviewed-by: Ilan Peer --- diff --git a/src/p2p/p2p_pd.c b/src/p2p/p2p_pd.c index f62c63df7..ba01da145 100644 --- a/src/p2p/p2p_pd.c +++ b/src/p2p/p2p_pd.c @@ -966,8 +966,7 @@ void p2p_process_prov_disc_resp(struct p2p_data *p2p, const u8 *sa, p2p->cfg->cb_ctx, sa, P2P_PROV_DISC_INFO_UNAVAILABLE, adv_id, adv_mac, NULL); - } else if (msg.wps_config_methods != dev->req_config_methods || - status != P2P_SC_SUCCESS) { + } else if (status != P2P_SC_SUCCESS) { p2p_dbg(p2p, "Peer rejected our Provision Discovery Request"); if (p2p->cfg->prov_disc_fail) p2p->cfg->prov_disc_fail(p2p->cfg->cb_ctx, sa,