On 25.04.23 18:14, Vladimir Sementsov-Ogievskiy wrote:
Fix over-80 lines and missing curly brackets for if-operators, which
are required by QEMU coding style.

Signed-off-by: Vladimir Sementsov-Ogievskiy <vsement...@yandex-team.ru>
---
  hw/pci/pci.c | 20 +++++++++++---------
  1 file changed, 11 insertions(+), 9 deletions(-)

diff --git a/hw/pci/pci.c b/hw/pci/pci.c
index def5000e7b..4a61c8d24a 100644
--- a/hw/pci/pci.c
+++ b/hw/pci/pci.c
@@ -2297,10 +2297,12 @@ static void pci_add_option_rom(PCIDevice *pdev, bool 
is_default_rom,
      char name[32];
      const VMStateDescription *vmsd;
- if (!pdev->romfile)
+    if (!pdev->romfile) {
          return;
-    if (strlen(pdev->romfile) == 0)
+    }
+    if (strlen(pdev->romfile) == 0) {
          return;
+    }

Could be further simplified to

if (!pdev->romfile || !strlen(pdev->romfile)) {
        return;
}


Reviewed-by: David Hildenbrand <da...@redhat.com>

--
Thanks,

David / dhildenb


Reply via email to