P2P: Refactor p2p_process_prov_disc_resp() function
Add 'else if' to P2PS status verification to prevent a redundant condition checking. The first 'if' condition is true only if status == P2P_SC_SUCCESS || status == P2P_SC_SUCCESS_DEFERRED. while the second condition checks: status != P2P_SC_SUCCESS && status != P2P_SC_FAIL_INFO_CURRENTLY_UNAVAILABLE && status != P2P_SC_SUCCESS_DEFERRED Thus, the two conditions are mutually exclusive and 'else if' can be used if this case. Signed-off-by: Max Stepanov <Max.Stepanov@intel.com> Reviewed-by: Ilan Peer <ilan.peer@intel.com>
This commit is contained in:
parent
20f4c3d76b
commit
ea210b9f8a
|
@ -920,9 +920,7 @@ void p2p_process_prov_disc_resp(struct p2p_data *p2p, const u8 *sa,
|
||||||
msg.persistent_ssid_len, 1, 0, NULL);
|
msg.persistent_ssid_len, 1, 0, NULL);
|
||||||
}
|
}
|
||||||
p2ps_prov_free(p2p);
|
p2ps_prov_free(p2p);
|
||||||
}
|
} else if (status != P2P_SC_SUCCESS &&
|
||||||
|
|
||||||
if (status != P2P_SC_SUCCESS &&
|
|
||||||
status != P2P_SC_FAIL_INFO_CURRENTLY_UNAVAILABLE &&
|
status != P2P_SC_FAIL_INFO_CURRENTLY_UNAVAILABLE &&
|
||||||
status != P2P_SC_SUCCESS_DEFERRED && p2p->p2ps_prov) {
|
status != P2P_SC_SUCCESS_DEFERRED && p2p->p2ps_prov) {
|
||||||
if (p2p->cfg->p2ps_prov_complete)
|
if (p2p->cfg->p2ps_prov_complete)
|
||||||
|
|
Loading…
Reference in a new issue