瀏覽代碼

qcacmn: Changing the integer suffix from 1L to 1ULL

In expression 1L << err_code if the err_code is more than 32,
it is left shifting by more than 32 bits which will result in
undefined behavior and will be overflowed. So changing the suffix
from 1L to 1ULL as max value of err_code can go up to 63.

Change-Id: I6218a1634e982e4f25e5d92d55325ed9bb2658e9
CRs-Fixed: 3627050
Vaishnavi Chekuru 1 年之前
父節點
當前提交
c3697eb2a0
共有 1 個文件被更改,包括 1 次插入1 次删除
  1. 1 1
      dp/wifi3.0/monitor/dp_rx_mon.c

+ 1 - 1
dp/wifi3.0/monitor/dp_rx_mon.c

@@ -1325,7 +1325,7 @@ static inline bool
 dp_rx_is_valid_undecoded_frame(uint64_t err_mask, uint8_t err_code)
 dp_rx_is_valid_undecoded_frame(uint64_t err_mask, uint8_t err_code)
 {
 {
 	if (err_code < CDP_PHYRX_ERR_MAX &&
 	if (err_code < CDP_PHYRX_ERR_MAX &&
-	    (err_mask & (1L << err_code)))
+	    (err_mask & (1ULL << err_code)))
 		return true;
 		return true;
 
 
 	return false;
 	return false;