diff options
| author | Srinivas Girigowda <sgirigow@codeaurora.org> | 2016-12-01 14:44:30 -0800 |
|---|---|---|
| committer | Gerrit - the friendly Code Review server <code-review@localhost> | 2016-12-02 07:00:08 -0800 |
| commit | e84e0d1ba60d28578db1f60cd717f96c9f712f64 (patch) | |
| tree | b4993b89ff8f42fd5bbde8eddb847e313a6a0720 | |
| parent | e9d34ab030e430142e2c27725223079d92144c04 (diff) | |
qcacld-2.0: Fix incorrect data type assignment
In function wma_get_buf_extscan_change_monitor_cmd() and
wma_get_buf_iextscan_hotlist_cmd(), numAp is of type uint32_t
but it is assigned to variable numap of type int.
Fix this by making 'numap' also of same type 'uint32_t'.
Change-Id: I02502f05d2305f62cbde47db2893770673d19fc3
CRs-Fixed: 1096384
| -rw-r--r-- | CORE/SERVICES/WMA/wma.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/CORE/SERVICES/WMA/wma.c b/CORE/SERVICES/WMA/wma.c index 8ab1d2da9cfe..a26113ed6dfb 100644 --- a/CORE/SERVICES/WMA/wma.c +++ b/CORE/SERVICES/WMA/wma.c @@ -28624,7 +28624,7 @@ VOS_STATUS wma_get_buf_extscan_hotlist_cmd(tp_wma_handle wma_handle, int cmd_len = 0; int num_entries = 0; int min_entries = 0; - int numap = photlist->numAp; + uint32_t numap = photlist->numAp; int len = sizeof(*cmd); len += WMI_TLV_HDR_SIZE; @@ -28633,7 +28633,7 @@ VOS_STATUS wma_get_buf_extscan_hotlist_cmd(tp_wma_handle wma_handle, /* setbssid hotlist expects the bssid list * to be non zero value */ - if ((numap <= 0) || (numap > WLAN_EXTSCAN_MAX_HOTLIST_APS)) { + if (!numap || (numap > WLAN_EXTSCAN_MAX_HOTLIST_APS)) { WMA_LOGE("%s: Invalid number of APs: %d", __func__, numap); return VOS_STATUS_E_INVAL; } @@ -28923,10 +28923,10 @@ VOS_STATUS wma_get_buf_extscan_change_monitor_cmd(tp_wma_handle wma_handle, u_int8_t *buf_ptr; int j; int len = sizeof(*cmd); - int numap = psigchange->numAp; + uint32_t numap = psigchange->numAp; tSirAPThresholdParam *src_ap = psigchange->ap; - if ((numap <= 0) || (numap > WLAN_EXTSCAN_MAX_SIGNIFICANT_CHANGE_APS)) { + if (!numap || (numap > WLAN_EXTSCAN_MAX_SIGNIFICANT_CHANGE_APS)) { WMA_LOGE("%s: Invalid number of APs: %d", __func__, numap); return VOS_STATUS_E_INVAL; |
