summary refs log tree commit diff stats
path: root/hw/virtio/virtio-input-host-pci.c
diff options
context:
space:
mode:
authorMatheus Tavares Bernardino <quic_mathbern@quicinc.com>2023-03-13 15:58:19 -0300
committerJuan Quintela <quintela@redhat.com>2023-03-16 16:07:07 +0100
commitd84a78d15d3af9ff28ceec6906a4b101bd545b55 (patch)
tree68b03cf41f925795e8ca59e711326959e3313664 /hw/virtio/virtio-input-host-pci.c
parenta5382214d8b099bb2fe60b206097567762861800 (diff)
downloadfocaccia-qemu-d84a78d15d3af9ff28ceec6906a4b101bd545b55.tar.gz
focaccia-qemu-d84a78d15d3af9ff28ceec6906a4b101bd545b55.zip
migration/xbzrle: use ctz64 to avoid undefined result
__builtin_ctzll() produces undefined results when the argument is 0.
This can be seen through test-xbzrle, which produces the following
warning:

../migration/xbzrle.c:265: runtime error: passing zero to ctz(), which is not a valid argument

Replace __builtin_ctzll() with our ctz64() wrapper which properly
handles 0.

Signed-off-by: Matheus Tavares Bernardino <quic_mathbern@quicinc.com>
Reviewed-by: Dr. David Alan Gilbert <dgilbert@redhat.com>
Reviewed-by: Juan Quintela <quintela@redhat.com>
Signed-off-by: Juan Quintela <quintela@redhat.com>
Diffstat (limited to 'hw/virtio/virtio-input-host-pci.c')
0 files changed, 0 insertions, 0 deletions