qcacmn: Fix uninitialize variables in few policy manager APIs

Few variables are left uninitialized and they are being used
with some random value.

Fix by initializing to default value.

CRs-Fixed: 2232791
Change-Id: I3351cae52c58e963601d53376f42ca8ebf0d3b9a
This commit is contained in:
Krunal Soni
2018-04-27 16:46:08 -07:00
committed by nshrivas
parent cf2db1bee2
commit 3370ea52d1
2 changed files with 3 additions and 3 deletions

View File

@@ -1357,7 +1357,7 @@ policy_mgr_get_nondfs_preferred_channel(struct wlan_objmgr_psoc *psoc,
* under 5G MCC scenario
*/
uint8_t channel = PM_24_GHZ_CHANNEL_6;
uint32_t i, pcl_len;
uint32_t i, pcl_len = 0;
pm_ctx = policy_mgr_get_context(psoc);
if (!pm_ctx) {

View File

@@ -536,8 +536,8 @@ static void utils_dfs_get_channel_list(struct wlan_objmgr_pdev *pdev,
static void utils_dfs_get_chan_list(struct wlan_objmgr_pdev *pdev,
struct dfs_channel *chan_list, uint32_t *num_chan)
{
uint8_t pcl_ch[NUM_CHANNELS];
uint8_t weight_list[NUM_CHANNELS];
uint8_t pcl_ch[NUM_CHANNELS] = {0};
uint8_t weight_list[NUM_CHANNELS] = {0};
uint32_t len;
uint32_t weight_len;
int i;