소스 검색

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)
 {
 	if (err_code < CDP_PHYRX_ERR_MAX &&
-	    (err_mask & (1L << err_code)))
+	    (err_mask & (1ULL << err_code)))
 		return true;
 
 	return false;