Fix integer overflow when computing the progress percentage

This commit is contained in:
Andrea Mazzoleni 2024-01-03 20:02:42 +01:00
parent a3270063dd
commit 85ca997bf2
4 changed files with 40 additions and 24 deletions

View file

@ -251,5 +251,10 @@ static inline int bit_vect_test(bit_vect_t* bit_vect, size_t off)
return (bit_vect[off / BIT_VECT_SIZE] & mask) != 0;
}
#endif
/****************************************************************************/
/* muldiv */
unsigned muldiv(uint64_t v, uint64_t mul, uint64_t div);
unsigned muldiv_upper(uint64_t v, uint64_t mul, uint64_t div);
#endif