[libvirt] [PATCH 1/3] qemuBuildSevCommandLine: s/obj/buf/

Michal Privoznik posted 3 patches 6 years, 11 months ago
[libvirt] [PATCH 1/3] qemuBuildSevCommandLine: s/obj/buf/
Posted by Michal Privoznik 6 years, 11 months ago
The variable points to a buffer not a domain object therefore its
current name is misleading.

Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
---
 src/qemu/qemu_command.c | 14 +++++++-------
 1 file changed, 7 insertions(+), 7 deletions(-)

diff --git a/src/qemu/qemu_command.c b/src/qemu/qemu_command.c
index 6a95344fd5..a7f659308c 100644
--- a/src/qemu/qemu_command.c
+++ b/src/qemu/qemu_command.c
@@ -9694,7 +9694,7 @@ static int
 qemuBuildSevCommandLine(virDomainObjPtr vm, virCommandPtr cmd,
                         virDomainSevDefPtr sev)
 {
-    virBuffer obj = VIR_BUFFER_INITIALIZER;
+    virBuffer buf = VIR_BUFFER_INITIALIZER;
     qemuDomainObjPrivatePtr priv = vm->privateData;
     char *path = NULL;
 
@@ -9704,25 +9704,25 @@ qemuBuildSevCommandLine(virDomainObjPtr vm, virCommandPtr cmd,
     VIR_DEBUG("policy=0x%x cbitpos=%d reduced_phys_bits=%d",
               sev->policy, sev->cbitpos, sev->reduced_phys_bits);
 
-    virBufferAsprintf(&obj, "sev-guest,id=sev0,cbitpos=%d", sev->cbitpos);
-    virBufferAsprintf(&obj, ",reduced-phys-bits=%d", sev->reduced_phys_bits);
-    virBufferAsprintf(&obj, ",policy=0x%x", sev->policy);
+    virBufferAsprintf(&buf, "sev-guest,id=sev0,cbitpos=%d", sev->cbitpos);
+    virBufferAsprintf(&buf, ",reduced-phys-bits=%d", sev->reduced_phys_bits);
+    virBufferAsprintf(&buf, ",policy=0x%x", sev->policy);
 
     if (sev->dh_cert) {
         if (virAsprintf(&path, "%s/dh_cert.base64", priv->libDir) < 0)
             return -1;
-        virBufferAsprintf(&obj, ",dh-cert-file=%s", path);
+        virBufferAsprintf(&buf, ",dh-cert-file=%s", path);
         VIR_FREE(path);
     }
 
     if (sev->session) {
         if (virAsprintf(&path, "%s/session.base64", priv->libDir) < 0)
             return -1;
-        virBufferAsprintf(&obj, ",session-file=%s", path);
+        virBufferAsprintf(&buf, ",session-file=%s", path);
         VIR_FREE(path);
     }
 
-    virCommandAddArgList(cmd, "-object", virBufferContentAndReset(&obj), NULL);
+    virCommandAddArgList(cmd, "-object", virBufferContentAndReset(&buf), NULL);
     return 0;
 }
 
-- 
2.16.4

--
libvir-list mailing list
libvir-list@redhat.com
https://www.redhat.com/mailman/listinfo/libvir-list
Re: [libvirt] [PATCH 1/3] qemuBuildSevCommandLine: s/obj/buf/
Posted by Ján Tomko 6 years, 11 months ago
On Wed, Jun 13, 2018 at 12:51:57PM +0200, Michal Privoznik wrote:
>The variable points to a buffer not a domain object therefore its
>current name is misleading.
>
>Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
>---
> src/qemu/qemu_command.c | 14 +++++++-------
> 1 file changed, 7 insertions(+), 7 deletions(-)
>

Reviewed-by: Ján Tomko <jtomko@redhat.com>

Jano
--
libvir-list mailing list
libvir-list@redhat.com
https://www.redhat.com/mailman/listinfo/libvir-list