فهرست منبع

qcacmn: Fix compilation error by initializing num_channels to zero

To fix 'error: ‘num_channels’ may be used uninitialized in this
function' error, initialize num_channels to zero.

Change-Id: Ic35b606a6e075dd309844c5fca793f970a701f5e
CRs-Fixed: 2570055
Shashikala Prabhu 5 سال پیش
والد
کامیت
2c2681c3d1
1فایلهای تغییر یافته به همراه1 افزوده شده و 1 حذف شده
  1. 1 1
      umac/dfs/core/src/misc/dfs_random_chan_sel.c

+ 1 - 1
umac/dfs/core/src/misc/dfs_random_chan_sel.c

@@ -1901,7 +1901,7 @@ static void dfs_apply_rules_for_freq(struct wlan_dfs *dfs,
 	bool found = false;
 	uint16_t j;
 	uint16_t freq_list[NUM_CHANNELS_160MHZ];
-	uint8_t num_channels;
+	uint8_t num_channels = 0;
 
 	dfs_debug(dfs, WLAN_DEBUG_DFS_RANDOM_CHAN, "flags %d", flags);
 	flag_no_weather = (dfs_region == DFS_ETSI_REGION_VAL) ?