Ver Fonte

qcacld-3.0: Align return value check for lim_cmp_ssid

lim_cmp_ssid api returns zero when comparison ssid matches
else returns non zero. Checking return value with true/false
can cause confusion and errors.
Replace the return value check from true/false to
zero/non-zero values.

Change-Id: Id22560cb4c2289431995dab3087b4eb24546a8bf
CRs-Fixed: 1067454
Ankit Gupta há 8 anos atrás
pai
commit
d66a881e08
2 ficheiros alterados com 3 adições e 3 exclusões
  1. 2 2
      core/mac/src/pe/lim/lim_api.c
  2. 1 1
      core/mac/src/pe/lim/lim_assoc_utils.c

+ 2 - 2
core/mac/src/pe/lim/lim_api.c

@@ -1252,7 +1252,7 @@ lim_handle_ibss_coalescing(tpAniSirGlobal pMac,
 	   4. Encyption type in the beacon does not match with self station
 	 */
 	if ((!pBeacon->capabilityInfo.ibss) ||
-	    (lim_cmp_ssid(&pBeacon->ssId, psessionEntry) == true) ||
+	    lim_cmp_ssid(&pBeacon->ssId, psessionEntry) ||
 	    (psessionEntry->currentOperChannel != pBeacon->channelNumber))
 		retCode = eSIR_LIM_IGNORE_BEACON;
 	else if (lim_ibss_enc_type_matched(pBeacon, psessionEntry) != eSIR_TRUE) {
@@ -1403,7 +1403,7 @@ lim_detect_change_in_ap_capabilities(tpAniSirGlobal pMac,
 						     psessionEntry);
 	if ((false == psessionEntry->limSentCapsChangeNtf) &&
 	    (((!lim_is_null_ssid(&pBeacon->ssId)) &&
-	       (false != lim_cmp_ssid(&pBeacon->ssId, psessionEntry))) ||
+	       lim_cmp_ssid(&pBeacon->ssId, psessionEntry)) ||
 	     ((SIR_MAC_GET_ESS(apNewCaps.capabilityInfo) !=
 	       SIR_MAC_GET_ESS(psessionEntry->limCurrentBssCaps)) ||
 	      (SIR_MAC_GET_PRIVACY(apNewCaps.capabilityInfo) !=

+ 1 - 1
core/mac/src/pe/lim/lim_assoc_utils.c

@@ -70,7 +70,7 @@
  * This function is called in various places within LIM code
  * to determine whether received SSID is same as SSID in use.
  *
- * Return: true if SSID matched, false otherwise.
+ * Return: zero if SSID matched, non-zero otherwise.
  */
 uint32_t lim_cmp_ssid(tSirMacSSid *rx_ssid, tpPESession session_entry)
 {