[PATCH 3/3] src: Use 1U for bit shifting

Tim Wiederhake twiederh at redhat.com
Mon Jun 14 11:31:54 UTC 2021


On Mon, 2021-06-14 at 13:06 +0200, Michal Privoznik wrote:
> In a few places we take 1 and shift it left repeatedly. So much
> that it won't longer fit into signed integer. The problem is that
> this is undefined behaviour. Switching to 1U makes us stay within
> boundaries.
> 
> Signed-off-by: Michal Privoznik <mprivozn at redhat.com>

Reviewed-by: Tim Wiederhake <twiederh at redhat.com>




More information about the libvir-list mailing list