On Mon, Apr 14, 2025 at 10:29 PM Andre Muezerie
<andre...@linux.microsoft.com> wrote:
>
> Coverity complained about an overflow in a recently added function:
>
> https://scan4.scan.coverity.com/#/project-view/66295/10075?selectedIssue=461876
>
> CID 461876: (#1 of 1): Overflowed constant (INTEGER_OVERFLOW)
> 21. overflow_const: Expression powi, which is equal to 0, where base is
> known to be equal to 1024, overflows the type that receives it, an
> unsigned integer 64 bits wide.
>
> This complaint was a false positive, but it revealed that the function
> could be written in a simpler way, making the code more readable and
> likely allowing Coverity to make the right determination.
>
> Signed-off-by: Andre Muezerie <andre...@linux.microsoft.com>

Reviewed-by: David Marchand <david.march...@redhat.com>

Applied, thanks.


-- 
David Marchand

Reply via email to