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

2020-07-02 Thread Eric Blake

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 
---
  src/qemu/qemu_conf.c | 4 ++--
  1 file changed, 2 insertions(+), 2 deletions(-)



Reviewed-by: Eric Blake 

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



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

2020-07-02 Thread Peter Krempa
Move the extraction of the config value so that it makes more sense
after upcoming refactors.

Signed-off-by: Peter Krempa 
---
 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", 
>nbdTLSx509certdir) < 0)
 return -1;
+if (virConfGetValueBool(conf, "chardev_tls", >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", >chardevTLS) < 0)
-return -1;
 GET_CONFIG_TLS_CERTINFO(chardev);

 GET_CONFIG_TLS_CERTINFO(migrate);
-- 
2.26.2