[PATCH 05/24] virQEMUDriverConfigLoadSpecificTLSEntry: Move fetching of 'chardev_tls' above macro

Peter Krempa posted 24 patches 5 years, 7 months ago
[PATCH 05/24] virQEMUDriverConfigLoadSpecificTLSEntry: Move fetching of 'chardev_tls' above macro
Posted by Peter Krempa 5 years, 7 months ago
Move the extraction of the config value so that it makes more sense
after upcoming refactors.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
---
 src/qemu/qemu_conf.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/qemu/qemu_conf.c b/src/qemu/qemu_conf.c
index 33b3989268..2cbff1348a 100644
--- a/src/qemu/qemu_conf.c
+++ b/src/qemu/qemu_conf.c
@@ -483,6 +483,8 @@ virQEMUDriverConfigLoadSpecificTLSEntry(virQEMUDriverConfigPtr cfg,
         return -1;
     if (virConfGetValueString(conf, "nbd_tls_x509_cert_dir", &cfg->nbdTLSx509certdir) < 0)
         return -1;
+    if (virConfGetValueBool(conf, "chardev_tls", &cfg->chardevTLS) < 0)
+        return -1;

 #define GET_CONFIG_TLS_CERTINFO(val) \
     do { \
@@ -500,8 +502,6 @@ virQEMUDriverConfigLoadSpecificTLSEntry(virQEMUDriverConfigPtr cfg,
             return -1; \
     } while (0)

-    if (virConfGetValueBool(conf, "chardev_tls", &cfg->chardevTLS) < 0)
-        return -1;
     GET_CONFIG_TLS_CERTINFO(chardev);

     GET_CONFIG_TLS_CERTINFO(migrate);
-- 
2.26.2

Re: [PATCH 05/24] virQEMUDriverConfigLoadSpecificTLSEntry: Move fetching of 'chardev_tls' above macro
Posted by Eric Blake 5 years, 7 months ago
On 7/2/20 9:39 AM, Peter Krempa wrote:
> Move the extraction of the config value so that it makes more sense
> after upcoming refactors.
> 
> Signed-off-by: Peter Krempa <pkrempa@redhat.com>
> ---
>   src/qemu/qemu_conf.c | 4 ++--
>   1 file changed, 2 insertions(+), 2 deletions(-)
> 

Reviewed-by: Eric Blake <eblake@redhat.com>

-- 
Eric Blake, Principal Software Engineer
Red Hat, Inc.           +1-919-301-3226
Virtualization:  qemu.org | libvirt.org