P2P: Refactor p2p_process_prov_disc_resp() function
authorMax Stepanov <Max.Stepanov@intel.com>
Thu, 2 Jul 2015 07:45:00 +0000 (10:45 +0300)
committerJouni Malinen <j@w1.fi>
Tue, 7 Jul 2015 17:21:44 +0000 (20:21 +0300)
commitea210b9f8a28962559a6ec9f171b7cf20c841e87
tree6ec5b951a71ce3d11629e86cbb9e68d8ef8409b8
parent20f4c3d76bd5ee0fd6a2c10e1fd38b6b8832d25e
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>
src/p2p/p2p_pd.c