[PATCH] qemuDomainAttachHostPCIDevice: Fix coding style

Michal Privoznik posted 1 patch 2 years, 2 months ago
Test syntax-check failed
Patches applied successfully (tree, apply log)
git fetch https://github.com/patchew-project/libvirt tags/patchew/e185f03f39eb7a05262604a51101913119e5e4b4.1643110786.git.mprivozn@redhat.com
src/qemu/qemu_hotplug.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
[PATCH] qemuDomainAttachHostPCIDevice: Fix coding style
Posted by Michal Privoznik 2 years, 2 months ago
Our coding style requires that a body of an if() longer than two
lines is wrapped in a curly braces. There's one offender in
qemuDomainAttachHostPCIDevice(). Fortunately, there was no
functional problem because one of the lines is a comment.

Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
---

Pushed under trivial rule.

 src/qemu/qemu_hotplug.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/src/qemu/qemu_hotplug.c b/src/qemu/qemu_hotplug.c
index 22acbd0852..f36de2385a 100644
--- a/src/qemu/qemu_hotplug.c
+++ b/src/qemu/qemu_hotplug.c
@@ -1663,9 +1663,10 @@ qemuDomainAttachHostPCIDevice(virQEMUDriver *driver,
 
     qemuAssignDeviceHostdevAlias(vm->def, &info->alias, -1);
 
-    if (qemuDomainIsPSeries(vm->def))
+    if (qemuDomainIsPSeries(vm->def)) {
         /* Isolation groups are only relevant for pSeries guests */
         qemuDomainFillDeviceIsolationGroup(vm->def, &dev);
+    }
 
     if (qemuDomainEnsurePCIAddress(vm, &dev) < 0)
         goto error;
-- 
2.34.1