can: cast value 1U to type ULL in function can_stm32_set_filter
Potentially overflowing expression 1U << register_demand changed to the 1ULL << register_demand to avoid overflow. Coverity-CID: 190996 Fixes: #13829 Signed-off-by: Maksim Masalski <maxxliferobot@gmail.com>
This commit is contained in:
parent
f32b94c46e
commit
9f8db3d729
1 changed files with 1 additions and 1 deletions
|
@ -655,7 +655,7 @@ static inline int can_stm32_set_filter(const struct zcan_filter *filter,
|
|||
|
||||
do {
|
||||
u64_t usage_shifted = (device_data->filter_usage >> filter_nr);
|
||||
u64_t usage_demand_mask = ((u64_t)1U << register_demand) - 1;
|
||||
u64_t usage_demand_mask = (1ULL << register_demand) - 1;
|
||||
bool bank_is_empty;
|
||||
|
||||
bank_nr = filter_nr / 4;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue