mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-07 09:43:56 -06:00
qemu/msi: missing braces
MSIX present bit is tested incorrectly, and only happens to work because the bit we are testing is 0x1. Add braces to fix this. Reported-by: Blue Swirl <blauwirbel@gmail.com> Signed-off-by: Michael S. Tsirkin <mst@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
This commit is contained in:
parent
4bfd1712d7
commit
72755a7096
1 changed files with 2 additions and 1 deletions
|
@ -286,8 +286,9 @@ void msix_save(PCIDevice *dev, QEMUFile *f)
|
|||
{
|
||||
unsigned n = dev->msix_entries_nr;
|
||||
|
||||
if (!dev->cap_present & QEMU_PCI_CAP_MSIX)
|
||||
if (!(dev->cap_present & QEMU_PCI_CAP_MSIX)) {
|
||||
return;
|
||||
}
|
||||
|
||||
qemu_put_buffer(f, dev->msix_table_page, n * MSIX_ENTRY_SIZE);
|
||||
qemu_put_buffer(f, dev->msix_table_page + MSIX_PAGE_PENDING, (n + 7) / 8);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue