Browse Source

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 năm trước cách đây
mục cha
commit
c3697eb2a0
1 tập tin đã thay đổi với 1 bổ sung1 xóa
  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)
 {
 	if (err_code < CDP_PHYRX_ERR_MAX &&
-	    (err_mask & (1L << err_code)))
+	    (err_mask & (1ULL << err_code)))
 		return true;
 
 	return false;