[libvirt PATCH 02/14] virQEMUCapsSEVInfoCopy: Remove superfluous g_auto usage

Tim Wiederhake twiederh at redhat.com
Wed Jan 12 13:10:03 UTC 2022


Signed-off-by: Tim Wiederhake <twiederh at redhat.com>
---
 src/qemu/qemu_capabilities.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/qemu/qemu_capabilities.c b/src/qemu/qemu_capabilities.c
index 5f1eb5014c..f8db6fd370 100644
--- a/src/qemu/qemu_capabilities.c
+++ b/src/qemu/qemu_capabilities.c
@@ -1891,7 +1891,7 @@ static int
 virQEMUCapsSEVInfoCopy(virSEVCapability **dst,
                        virSEVCapability *src)
 {
-    g_autoptr(virSEVCapability) tmp = NULL;
+    virSEVCapability *tmp;
 
     if (!src) {
         *dst = NULL;
@@ -1908,7 +1908,7 @@ virQEMUCapsSEVInfoCopy(virSEVCapability **dst,
     tmp->max_guests = src->max_guests;
     tmp->max_es_guests = src->max_es_guests;
 
-    *dst = g_steal_pointer(&tmp);
+    *dst = tmp;
     return 0;
 }
 
-- 
2.31.1




More information about the libvir-list mailing list