]> git.ipfire.org Git - thirdparty/libvirt.git/commit
src: Use 1U for bit shifting
authorMichal Privoznik <mprivozn@redhat.com>
Mon, 14 Jun 2021 10:46:58 +0000 (12:46 +0200)
committerMichal Privoznik <mprivozn@redhat.com>
Mon, 14 Jun 2021 12:16:54 +0000 (14:16 +0200)
commit2b20f3e0fa9156b3856d6e746e151a1da127fbbb
tree681bda30aa911b47add381adde5459ccd7f97554
parent1ab5a37c4a70434a1dacebbdababb91baaa29ef1
src: Use 1U for bit shifting

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@redhat.com>
Reviewed-by: Tim Wiederhake <twiederh@redhat.com>
src/conf/domain_capabilities.h
src/cpu/cpu_x86.c